When try_creating_fbo fails it deletes any intermediate render buffers
that were created. However it doesn't clear the list so I think if it
failed a second time it would try to delete the render buffers
again. This could potentially cause problems if a subsequent fbo is
created because the destructor for the original might delete the
renderbuffers of the new fbo.
Since a ClutterClone may be allocated a different size than its source
actor we need to apply a scale factor before painting the source actor.
We were manually using cogl_scale to do this in clutter_clone_paint but
really this kind of thing is best handled in an implementation of the
apply_transform virtual so Clutter can be aware of the transform for
other purposes, such as input transformations. Also we want to provide
an implementation of the get_paint_volume virtual where Clutter will
also expect to be able to use the apply_transform virtual to transform
the volume into its parent's coordinate space.
If a NULL clip is passed to clutter_stage_glx_add_redraw_clip then we
update the redraw clip to have width of 0, but we weren't setting
stage_glx->initialized_redraw_clip = TRUE. This could result in a full,
unclipped stage redraw being reduced to a clipped redraw.
This adds a verbose warning that will be displayed if
clutter_actor_allocate is passed an actor that isn't a descendent of a
ClutterStage. Layouting should always bubble up from a stage so this
condition is likely to indicate a buggy container that allocating a
child that it has already unparented.
When building actor relative transforms, instead of using the matrix
stack to combine transformations and making assumptions about what is
currently on the stack we now just explicitly initialize an identity
matrix and apply transforms to that.
This removes the full_vertex_t typedef for internal transformation code
and we just use ClutterVertex.
ClutterStage now implements apply_transform like any other actor now
and the code we had in _cogl_setup_viewport has been moved to the
stage's apply_transform instead.
ClutterStage now tracks an explicit projection matrix and viewport
geometry. The projection matrix is derived from the perspective whenever
that changes, and the viewport is updated when the stage gets a new
allocation. The SYNC_MATRICES mechanism has been removed in favour of
_clutter_stage_dirty_viewport/projection() APIs that get used when
switching between multiple stages to ensure cogl has the latest
information about the onscreen framebuffer.
This adds _clutter_actor_get_stage_internal to clutter-private.h since
we plan to use it in clutter-offscreen-effect when preparing to
redirect an actor offscreen.
* elliot/cookbook-animations-reuse:
cookbook: Added a recipe for reusing a complex animation
cookbook: Added id for section in "rotating an actor" recipe
cookbook: Simplified and clarified example code
cookbook: Cleaned up the "animations reuse" example
cookbook: Refactored reusable animation example
cookbook: Added example for animation reuse recipe
This recipe explains how to "reuse" the same animation
definition for different actors, by creating a new
instance of a "rig" (empty container) and animation
for the rig each time the animation is required.
An actor is then re-parented to the rig and animated
using it, rather than being animated directly.
JSON is used to define the rig + animator, to make
creating new instances of them simpler. The recipe
also discusses various caveats around using this
approach, rather than directly animating an actor.
Modified the "animation reuse" sample code to provide
a simpler example to explain in the recipe.
Also modified variable names to mirror the names used
for the previous "complex animation" example and added
some more comments, to further simplify and support the
recipe.
With some help from pippin, moved variable declarations
into more sensible positions within their functions,
changed a function name, and found a better way
to unref a script once its associated actor has
been destroyed.
Extracted the animation into its own JSON definition,
then create a new script and get the animation each
time a rectangle is clicked.
Removes the need to reparent onto the background and
copy property values to the rectangle after the animation,
and generally much cleaner.
Added an example showing how to reuse a ClutterAnimator
instance to animate multiple actors at different times
using an animatable rig, combined with reparenting.
Instead of doing the shlib trick, build ClutterJson (if needed) inside
the top-level clutter/ directory - similar to a non-recursive layout.
Hopefully, one day, we'll be able to do this with a real non-recursive
layout.
Let's try to keep Cogl's build as non-recursive as possible, in the hope
that one day we'll be able to make it fully non-recursive along with the
rest of Clutter.
The keysyms defines in clutter-keysyms.h are generated from the X11 key
symbols headers by doing the equivalent of a pass of sed from XK_* to
CLUTTER_*. This might lead to namespace collisions, down the road.
Instead, we should use the CLUTTER_KEY_* namespace.
This commit includes the script, taken from GDK, that parses the X11
key symbols and generates two headers:
- clutter-keysyms.h: the default included header, with CLUTTER_KEY_*
- clutter-keysyms-compat.h: the compatibility header, with CLUTTER_*
The compat.h header file is included if CLUTTER_DISABLE_DEPRECATED is
not defined - essentially deprecating all the old key symbols.
This does not change any ABI and, assuming that an application or
library is not compiling with CLUTTER_DISABLE_DEPRECATED, the source
compatibility is still guaranteed.
Make sure we don't use deprecated API internally by adding
CLUTTER_DISABLE_DEPRECATED to the AM_CPPFLAGS.
This requires adding -UCLUTTER_DISABLE_DEPRECATED to the introspection
scanner CFLAGS, otherwise the deprecated API will never be introspected
and the data generated will not be compatible.
When animating an actor through clutter_actor_animate() and friends we
might want forcibly detach the animation instance from the actor in
order to start a new one - for instance, in response to user
interaction.
Currently, there is no way to do that except in a very convoluted way,
by emitting the ::completed signal and adding a special case in the
signal handlers; this is due to the fact that clutter_actor_animate()
adds more logic than the one added by clutter_animation_set_object(),
so calling set_object(NULL) or unreferencing the animation instance
itself won't be enough.
The right way to approach this is to add a new method to Clutter.Actor
that detaches any eventual Animation currently referencing it.
http://bugzilla.clutter-project.org/show_bug.cgi?id=2051
If we're depending on an uninstalled .gir, use --include-uninstalled.
We need to explicitly specify Cogl to let the scanner know it's also
uninstalled.
Signed-off-by: Emmanuele Bassi <ebassi@linux.intel.com>
Flushing the framebuffer state can cause some drawing to occur if the
framebuffer has a clip stack which needs the stencil buffer. This was
causing the array pointers set up by enable_state_for_drawing_buffer
to get mangled so it would crash when it hits glDrawArrays. This patch
moves the framebuffer state flush to before it sets up the array
pointers.
http://bugzilla.clutter-project.org/show_bug.cgi?id=2297
This requires some autotools magic when setting up the environment
through autogen.sh, because autoreconf does not do the right thing
by default.
The correct order for setting up localization is:
‣ autopoint
‣ aclocal
‣ ...
otherwise aclocal will copy the system's gettext.m4 instead of honouring
the version we specified with AM_GNU_GETTEXT_VERSION in configure.ac.
I think this is what commit 2cf1405506 intended to do since it
specifically mentioned cleaning up the trap in
clutter_x11_texture_pixmap_set_pixmap, but although it moved the untrap
to only be done in the case where Pixmap != None it left the position of
the trap itself unchanged. This meant the error trapping wouldn't be
balanced if pixmap == None since the untrap wouldn't be done. We now
only trap and untrap around the XGetGeometry call done when pixmap !=
None.
http://bugzilla.clutter-project.org/show_bug.cgi?id=2303
With currently distributed versions of Mesa, calling XFreePixmap()
before glxDestroyPixmap() will cause an X error from DRI. So, we
need to make sure that we get rid of the CoglTexturePixmapX11 before
we XFreePixmap().
clutter_x11_texture_pixmap_dispose(): Call
clutter_x11_texture_pixmap_set_pixmap() instead of using XFreePixmap
directly so that we leverage the text-clearing hack and destroy
things in the right order.
clutter_x11_texture_pixmap_set_pixmap(): Don't do a pointless roundtrip
and trap a pointless error when setting pixmap to None.
clutter_x11_texture_pixmap_set_pixmap(): Free damage resources when
we are setting Pixmap to None.
clutter_x11_texture_pixmap_set_window(): When setting a new window
or setting the window to None, immedediately call
cluter_x11_texture_pixmap_set_pixmap(). This means that set_window(None)
immediately will free any referenced resources related to the window.
http://bugzilla.clutter-project.org/show_bug.cgi?id=2303
Comprehensively add (out) annotations to functions parameters
returning int/float/double.
Not handled here: structure out returns like ClutterColor or
ClutterPerspective or GValue that should get (out caller-allocates).
Not handled here: Cogl
http://bugzilla.clutter-project.org/show_bug.cgi?id=2302
Since we're not using intltool, and since we need to let people on
Transifex generate their translations, we need to add the POT file
to the repository.