Robert Bragg [Wed, 8 Sep 2010 17:14:04 +0000 (18:14 +0100)]
actor: when culling/clipped redraws disable ignore paint box
To make comparing the performance with culling/clipped redraws
enabled/disabled fairer we now avoid querying the paint box when they
are disabled, so that results should reflect how the cost of
transforming paint volumes into screen space etc gets offset against the
benefit of culling.
Robert Bragg [Wed, 8 Sep 2010 10:32:29 +0000 (11:32 +0100)]
stage: only update viewport when allocation changes
In clutter_stage_allocate at the end we were always querying the latest
allocation set and using the geometry to assert the viewport and then
kicking a full redraw. These only need to be done when the allocation
really changes, so we now read the previous allocation at the start of
the function and compare at the end. This was stopping clipped redraws
from being used in a lot of cases.
Robert Bragg [Wed, 8 Sep 2010 00:18:30 +0000 (01:18 +0100)]
glx: queue full redraws for the first 2 frames
To consider that we've see a number of drivers that can struggle to get
going and may produce a bad first frame we now force the first 2 frames
to be full redraws. This became a serious issue after we started using
clipped redraws more aggressively because we assumed that after the
first frame the full framebuffer was valid and we only redraw the
content that changes. With buggy drivers though, applications would be
left with junk covering a lot of the stage until some event triggered a
full redraw.
Robert Bragg [Wed, 8 Sep 2010 00:15:00 +0000 (01:15 +0100)]
x11: minimize nasty artefacts when resizing windows
This is a workaround for a race condition when resizing windows while
there are in-flight glXCopySubBuffer blits happening.
The problem stems from the fact that rectangles for the blits are
described relative to the bottom left of the window and because we can't
guarantee control over the X window gravity used when resizing so the
gravity is typically NorthWest not SouthWest.
This means if you grow a window vertically the server will make sure to
place the old contents of the window at the top-left/north-west of your
new larger window, but that may happen asynchronous to GLX preparing to
do a blit specified relative to the bottom-left/south-west of the window
(based on the old smaller window geometry).
When the GLX issued blit finally happens relative to the new bottom of
your window, the destination will have shifted relative to the top-left
where all the pixels you care about are so it will result in a nasty
artefact making resizing look very ugly!
We can't currently fix this completely, in-part because the window
manager tends to trample any gravity we might set. This workaround
instead simply disables blits for a while if we are notified of any
resizes happening so if the user is resizing a window via the window
manager then they may see an artefact for one frame but then we will
fallback to redrawing the full stage until the cooling off period is
over.
Robert Bragg [Wed, 8 Sep 2010 00:03:15 +0000 (01:03 +0100)]
x11: Queue clipped redraws for Expose events
Instead of triggering a full stage redraw for Expose events we use the
geometry of the exposed region given in the event to queue a clipped
redraw of the stage.
Robert Bragg [Tue, 7 Sep 2010 22:35:26 +0000 (23:35 +0100)]
cogl: removes unused _cogl_setup_viewport
Clutter has now taken responsibility for managing its viewport,
projection matrix and view transform as part of ClutterStage so
_cogl_setup_viewport is no longer used by anything, and since it's quite
an obscure API anyway it's we've taken the opportunity to remove the
function.
Robert Bragg [Tue, 7 Sep 2010 22:25:18 +0000 (23:25 +0100)]
stage: Sometimes really force a full redraw
Since clutter_actor_queue_redraw now automatically clips redraws
according to the paint volume of the actor we have to be careful to
ensure we really force a full redraw when the stage is allocated a new
size or the stage viewport changes.
Robert Bragg [Tue, 7 Sep 2010 22:09:06 +0000 (23:09 +0100)]
actor: don't immediately queue redraw when queuing relayout
We have bent the originally documented semantics a bit so now where we
say "Queueing a new layout automatically queues a redraw as well" it
might be clearer to say "Queuing a new layout implicitly queues a redraw
as well if anything in the layout changes".
This should be close enough to the original semantics to not cause any
problems.
Without this change then we we fail to take advantage of clipped redraws
in a lot of cases because queuing a redraw with priv->needs_allocation
== TRUE will automatically be promoted to a full stage redraw since it's
not possible to determine a valid paint-volume.
Also queuing a redraw here will end up registering a redundant clipped
redraw for the current location, doing quite a lot of redundant
transforms, and then later when re-allocated during layouting another
queue redraw would happen with the correct paint-volume.
Robert Bragg [Tue, 7 Sep 2010 21:21:28 +0000 (22:21 +0100)]
Use paint volumes to do automatic culling
This uses actor paint volumes to perform culling during
clutter_actor_paint.
When performing a clipped redraw (because only a few localized actors
changed) then as we traverse the scenegraph painting the actors we can
now ignore actors that don't intersect the clip region. Early testing
shows this can have a big performance benefit; e.g. 100% fps improvement
for test-state with culling enabled and we hope that there are even much
more compelling examples than that in the real world,
Most Clutter applications are 2Dish interfaces and have quite a lot of
actors that get continuously painted when anything is animated. The
dynamic actors are often localized to an area of user focus though so
with culling we can completely avoid painting any of the static actors
outside the current clip region.
Obviously the cost of culling has to be offset against the cost of
painting to determine if it's a win, but our (limited) testing suggests
it should be a win for most applications.
Note: we hope we will be able to also bring another performance bump
from culling with another iteration - hopefully in the 1.6 cycle - to
avoid doing the culling in screen space and instead do it in the stage's
model space. This will hopefully let us minimize the cost of
transforming the actor volumes for culling.
Robert Bragg [Tue, 7 Sep 2010 21:11:28 +0000 (22:11 +0100)]
actor: Use paint volumes to always queue clipped redraws
This makes clutter_actor_queue_redraw transparently use an actor's paint
volume to queue a clipped redraw.
We save the actors paint box each time it is painted so that when
clutter_actor_queue_redraw is called we can determine the old and new
location of the actor so we know the full bounds of what must be redrawn
to clear its old view and show the new.
Robert Bragg [Tue, 7 Sep 2010 20:43:50 +0000 (21:43 +0100)]
actor: make _transform_and_project_box static
This makes _clutter_actor_transform_and_project_box a static function
and removes the prototype from clutter-private.h since it is no longer
used outside clutter-actor.c
Robert Bragg [Tue, 7 Sep 2010 20:47:01 +0000 (21:47 +0100)]
actor: _real_queue_relayout shouldn't queue redraw
The base implementation for the actor queue_relayout method was queuing
an implicit redraw, but there shouldn't be anything implied from the
mere process of queuing a redraw that should force us to queue a redraw.
If actors are moved as a part of relayouting later then they will queue
a redraw. Also clutter_actor_queue_relayout() still also explicitly
queues a redraw so I think this may have been doubly redundant.
Robert Bragg [Tue, 7 Sep 2010 20:56:33 +0000 (21:56 +0100)]
actor: re-allocation implies need to redraw
If clutter_actor_allocate finds it necessary to update an actors
allocation then it now also queue a redraw of that actor. Currently we
queue redraws for actors very early on when queuing a relayout instead
of waiting to determine the final outcome of relayouting to determine if
a redraw is really required. With this in place we can move away from
preemptive queuing of redraws.
Robert Bragg [Tue, 7 Sep 2010 19:29:01 +0000 (20:29 +0100)]
actor: separate the queue redraw code
clutter_actor_queue_relayout currently queues a relayout and a redraw,
but the plan is to change it to only queue a relayout and honour the
documentation by assuming that the process of relayouting will
result queuing redraws for any actors whos allocation changes.
This doesn't make that change it just adds an internal
_clutter_actor_queue_only_relayout function which
clutter_actor_queue_relayout now uses as well as calling
clutter_actor_queue_redraw.
Robert Bragg [Tue, 7 Sep 2010 19:08:00 +0000 (20:08 +0100)]
stage: make it possible to queue a relayout only
This adds a private ->relayout_pending boolean similar in spirit to
redraw_pending. This will allow us to queue a relayout without
implicitly queueing a redraw; instead we can depend on the actions
of a relayout to queue any necessary redraw.
Robert Bragg [Tue, 7 Sep 2010 18:40:28 +0000 (19:40 +0100)]
texture: Forward queue redraw/relayout for fbos
When clutter_texture_new_from_actor is use we need to track when the
source actor queues a redraw or a relayout so we can also queue a redraw
or relayout for the texture actor.
Robert Bragg [Tue, 7 Sep 2010 18:31:27 +0000 (19:31 +0100)]
Queue clipped redraws work in terms of paint volumes
There is an internal _clutter_actor_queue_redraw_with_clip API that gets
used for texture-from-pixmap to minimize what we redraw in response to
Damage events. It was previously working in terms of a ClutterActorBox
but it has now been changed so an actor can queue a redraw of volume
instead.
The plan is that clutter_actor_queue_redraw will start to transparently
use _clutter_actor_queue_redraw_with_clip when it can determine a paint
volume for the actor.
Robert Bragg [Tue, 7 Sep 2010 18:07:19 +0000 (19:07 +0100)]
blur-effect: fix paint volume padding
For the blur effect we use a BLUR_PADDING constant to pad out the volume
of the source actor on the x and y axis. Previously we were offsetting
the origin negatively using BLUR_PADDING and then adding BLUR_PADDING
to the width and height, but we should have been adding 2*BLUR_PADDING
instead.
Robert Bragg [Tue, 7 Sep 2010 22:07:52 +0000 (23:07 +0100)]
debug: CLUTTER_DEBUG_REDRAWS: disable clipped redraws
This ensures that clipped redraws are disabled when using
CLUTTER_PAINT=redraws. This may seem unintuitive given that this option
is for debugging clipped redraws, but we can't draw an outline outside
the clip region and anything we draw inside the clip region is liable to
leave a trailing mess on the screen since it won't be cleared up by
later clipped redraws.
Robert Bragg [Tue, 7 Sep 2010 17:50:29 +0000 (18:50 +0100)]
paint volumes: CLUTTER_PAINT=paint-volumes debug option
This adds a debug option to visualize the paint volumes of all actors.
When CLUTTER_PAINT=paint-volumes is exported in the environment before
running a Clutter application then all actors will have their bounding
volume drawn in green with a label corresponding to the actors type.
Robert Bragg [Tue, 7 Sep 2010 17:04:19 +0000 (18:04 +0100)]
paint volumes: another pass at the design
This is a fairly extensive second pass at exposing paint volumes for
actors.
The API has changed to allow clutter_actor_get_paint_volume to fail
since there are times - such as when an actor isn't a descendent of the
stage - when the volume can't be determined. Another example is when
something has connected to the "paint" signal of the actor and we simply
have no way of knowing what might be drawn in that handler.
The API has also be changed to return a const ClutterPaintVolume pointer
(transfer none) so we can avoid having to dynamically allocate the
volumes in the most common/performance critical code paths. Profiling was
showing the slice allocation of volumes taking about 1% of an apps time,
for some fairly basic tests. Most volumes can now simply be allocated on
the stack; for clutter_actor_get_paint_volume we return a pointer to
&priv->paint_volume and if we need a more dynamic allocation there is
now a _clutter_stage_paint_volume_stack_allocate() mechanism which lets
us allocate data which expires at the start of the next frame.
The API has been extended to make it easier to implement
get_paint_volume for containers by using
clutter_actor_get_transformed_paint_volume and
clutter_paint_volume_union. The first allows you to query the paint
volume of a child but transformed into parent actor coordinates. The
second lets you combine volumes together so you can union all the
volumes for a container's children and report that as the container's
own volume.
The representation of paint volumes has been updated to consider that
2D actors are the most common.
The effect apis, clutter-texture and clutter-group have been update
accordingly.
Robert Bragg [Thu, 19 Aug 2010 14:38:15 +0000 (15:38 +0100)]
actor-box: Adds clutter_actor_box_union utility
When using ClutterActorBoxs for representing clip regions it can be
convenient to be able to union multiple boxes together.
Robert Bragg [Thu, 19 Aug 2010 14:26:19 +0000 (15:26 +0100)]
texture: size fbos using clutter_actor_get_paint_box
Previously we used the transformed allocation but that doesn't take
into account actors with depth which may be projected outside the
area covered by the transformed allocation.
Emmanuele Bassi [Thu, 19 Aug 2010 14:27:51 +0000 (15:27 +0100)]
docs: Add PaintVolume to the API reference
And document the various related functions.
Emmanuele Bassi [Thu, 19 Aug 2010 13:06:52 +0000 (14:06 +0100)]
blur-effect: Add padding to account for the blur
The blur effect will sample pixels on the edges of the offscreen buffer,
so we want to add a padding to avoid clamping the blur.
We do this by creating a larger target texture, and updating the paint
volume of the actor during paint to take that padding into account.
Emmanuele Bassi [Thu, 19 Aug 2010 13:05:45 +0000 (14:05 +0100)]
offscreen-effect: Use the paint box to size the FBO
We should be using the real, on-screen, transformed size of the actor to
size and position the offscreen buffer we use to paint the actor for an
effect.
Emmanuele Bassi [Mon, 16 Aug 2010 16:02:15 +0000 (17:02 +0100)]
effect: Allow any effect to override the paint volume
An Effect implementation might override the paint volume of the actor to
which it is applied to. The get_paint_volume() virtual function should
be added to the Effect class vtable so that any effect can get the
current paint volume and update it.
The clutter_actor_get_paint_volume() function becomes context aware, and
does the right thing if called from within a ClutterEffect pre_paint()
or post_paint() implementation, by allowing all effects in the chain up
to the caller to modify the paint volume.
Emmanuele Bassi [Mon, 16 Aug 2010 14:53:28 +0000 (15:53 +0100)]
actor: Allow querying the paint volume
An actor has an implicit "paint volume", that is the volume in 3D space
occupied when painting itself.
The paint volume is defined as a cuboid with the origin placed at the
top-left corner of the actor; the size of the cuboid is given by three
vectors: width, height and depth.
ClutterActor provides API to convert the paint volume into a 2D box in
screen coordinates, to compute the on-screen area that an actor will
occupy when painted.
Actors can override the default implementation of the get_paint_volume()
virtual function to provide a different volume.
Emmanuele Bassi [Wed, 29 Sep 2010 13:10:38 +0000 (14:10 +0100)]
cally: Do not use deprecated functions
The function g_strcasecmp() has been deprecated since GLib 2.2.
Emmanuele Bassi [Wed, 29 Sep 2010 10:44:46 +0000 (11:44 +0100)]
animator: Code style fixes
Stephen Kennedy [Wed, 29 Sep 2010 09:56:48 +0000 (10:56 +0100)]
ClutterAnimator doesn't ref timeline properly
ClutterAnimator currently has a number of bugs related to its
referencing of its internal timeline.
1) The default timeline created in _init is not unreffed (it appears the
programmer has wrongly thought ClutterTimeline has a floating reference
based on the use of g_object_ref_sink in _set_timeline)
2) The timeline and slave_timeline vars are unreffed in finalize instead
of dispose
3) The signal handlers set up in _set_timeline are not disconnected when
the animator is disposed
http://bugzilla.clutter-project.org/show_bug.cgi?id=2347
Signed-off-by: Emmanuele Bassi <ebassi@linux.intel.com>
Neil Roberts [Mon, 27 Sep 2010 21:17:12 +0000 (22:17 +0100)]
Add a conformance test for clutter_actor_contains
This adds a conformance test for clutter_actor_contains to assert that
it gets the expected results for the given tree of actors.
Neil Roberts [Mon, 27 Sep 2010 16:51:01 +0000 (17:51 +0100)]
Simplify the loop for clutter_actor_contains
This reorganizes the loop for clutter_actor_contains so that it is a
for loop rather than a while loop. Although this is mostly just
nitpicking, I think this change could make the loop slightly faster if
not optimized because it doesn't perform the self == descendant check
twice and it is clearer.
Neil Roberts [Mon, 27 Sep 2010 16:47:38 +0000 (17:47 +0100)]
Document what happens when self==descendant in clutter_actor_contains
The documentation for clutter_actor_contains didn't specify what
happens when self==descendant. A strict reading of it might lead you
to think that it would return FALSE because in that case the
descendant isn't an immediate child or a deeper descendant. The code
actually would return TRUE. I think this is more useful so this patch
fixes the docs rather than the code.
Emmanuele Bassi [Mon, 27 Sep 2010 15:46:26 +0000 (16:46 +0100)]
Post-branch version bump to 1.5.1
Emmanuele Bassi [Sun, 26 Sep 2010 17:48:04 +0000 (18:48 +0100)]
doap: Remove mallum from the maintainers list
Emmanuele Bassi [Sun, 26 Sep 2010 15:52:58 +0000 (16:52 +0100)]
actor: Dispose all constrains
We are leaking the ClutterMetaGroup with all the constraints when
disposing an Actor.
Emmanuele Bassi [Sat, 25 Sep 2010 19:23:41 +0000 (20:23 +0100)]
json: Allow NULL as a value for strings, arrays and objects
We should not warn when asking for a string, array or object if the
contents were 'null'.
Patch from JSON-GLib.
Emmanuele Bassi [Fri, 24 Sep 2010 15:21:06 +0000 (16:21 +0100)]
test-clutter-units: Force a known resolution to avoid fuzzyness
Instead of taking the current resolution, whatever it may be, use a
known DPI. This should alleviate fuzzyness and create consistent
results.
Emmanuele Bassi [Fri, 24 Sep 2010 14:25:15 +0000 (15:25 +0100)]
Post-release version bump to 1.4.1
Emmanuele Bassi [Fri, 24 Sep 2010 14:07:17 +0000 (15:07 +0100)]
Release 1.4.0 (stable)
Elliot Smith [Fri, 24 Sep 2010 13:48:53 +0000 (14:48 +0100)]
cookbook: Reduce complexity of sample ClutterAnimator code for recipe
http://bugzilla.clutter-project.org/show_bug.cgi?id=2341
Signed-off-by: Emmanuele Bassi <ebassi@linux.intel.com>
Øyvind Kolås [Fri, 24 Sep 2010 12:28:08 +0000 (13:28 +0100)]
animator: fix removal of all keys
When removing all keys in a ClutterAnimator, the hash table with
object/property name pairs went out of sync. This change makes
the animator always clear this hash table upon key-removal; and
refreshing it if the animator's timeline is running.
Fixes bug #2335
Robert Bragg [Thu, 23 Sep 2010 21:18:42 +0000 (22:18 +0100)]
material: Don't prune ancestry if it owns some layers
Each time a material property changes we look to see if any of its
ancestry has become redundant and if so we prune that redundant
ancestry.
There was a problem with the logic that handles this though because we
weren't considering that a material which is a layer state authority may
still defer to ancestors to define the state of individual layers.
For example a material that derives from a parent with 5 layers can
become a STATE_LAYERS authority by simply changing it's ->n_layers count
to 4 and in that case it can still defer to its ancestors to define the
state of those 4 layers.
This patch checks first if a material is a layer state authority and if
so only tries to prune its ancestry if it also *owns* all the individual
layers it depends on. (I.e. if g_list_length
(material->layer_differences) != material->n_layers then it's not safe
to try pruning its ancestry!)
http://bugzilla-attachments.gnome.org/attachment.cgi?id=170907
Jammy Zhou [Tue, 21 Sep 2010 03:37:52 +0000 (11:37 +0800)]
cogl-framebuffer.c: GL_DEPTH_STENCIL not supported in gles
There is GL_INVALID_ENUM error for GL_DEPTH_STENCIL when call
glRenderbufferStorage() with OpenGL ES backend. So enable this
only for OpenGL backend.
Signed-off-by: Robert Bragg <robert@linux.intel.com>
Emmanuele Bassi [Thu, 23 Sep 2010 16:03:17 +0000 (17:03 +0100)]
cookbook: Further clarification of the anchor point
Make sure to add a note on the behaviour of the anchor point. Ideally,
it would be nice to have a recipe about it in the Actor section.
Elliot Smith [Thu, 23 Sep 2010 15:18:29 +0000 (16:18 +0100)]
cookbook: Recipe for "moving actors"
This recipe explains how to use the three animation
approaches (implicit, State, Animator) to animate movement
of actors.
Includes some guidelines about which approach to use when, with
a full code example for each approach.
The discussion section covers some subtleties around animated
movement; namely: moving actors out of their containers; anchor
points and movement; moving in the depth axis; interactions
between animated movement and constraints.
Elliot Smith [Thu, 23 Sep 2010 10:19:00 +0000 (11:19 +0100)]
cookbook: Fixed markup in animations section
Fixed indentation on some mark-up in an unrelated recipe.
Elliot Smith [Wed, 22 Sep 2010 15:58:08 +0000 (16:58 +0100)]
cookbook: Example of animated movement with ClutterAnimator
Added an example showing how to randomly animate the
simultaneous movement on the x axis of three actors,
using ClutterAnimator.
Elliot Smith [Tue, 21 Sep 2010 16:45:03 +0000 (17:45 +0100)]
cookbook: Example of animated movement with ClutterState
Added an example showing how to move two actors between
two states (one minimised, one maximised) using ClutterState
to do the movement. Also shows how movement can be mixed
with other animation (in this case, scaling).
Elliot Smith [Tue, 21 Sep 2010 16:44:00 +0000 (17:44 +0100)]
cookbook: Example of simple movement animation
Added example showing how to move an actor in one of the
three axes (x,y,z) in response to a button event on the
actor.
Emmanuele Bassi [Thu, 23 Sep 2010 15:17:24 +0000 (16:17 +0100)]
Add some more argument validation
This is all internal, so we shouldn't need it; unfortunately, it seems
we're passing invalid data internally, so for the time being catching
inconsistencies should at least emit a warning for us to backtrace.
Robert Bragg [Thu, 23 Sep 2010 15:03:06 +0000 (16:03 +0100)]
actor: don't pass NULL to _stage_set_pick_buffer_valid
This adds a check in clutter_actor_real_queue_redraw after calling
_clutter_actor_get_stage_internal to check in case the actor doesn't yet
have an associated stage so we can avoid passing a NULL stage pointer to
_clutter_stage_set_pick_buffer_valid which could cause a crash.
Robert Bragg [Thu, 23 Sep 2010 14:45:27 +0000 (15:45 +0100)]
docs: Put deprecated Cogl symbols into new section
This adds a "Cogl deprecated API" chapter to the Cogl reference manual
so we can group all the documentation for deprecated symbols together
instead of having them clutter up the documentation of symbols we would
rather developers used.
Robert Bragg [Wed, 25 Aug 2010 21:31:30 +0000 (22:31 +0100)]
docs: update the overview paragraph for Cogl
Instead of describing OpenGL as "a low level OpenGL abstraction
library" it is now summarised as "modern 3D graphics API".
Robert Bragg [Wed, 25 Aug 2010 19:36:20 +0000 (20:36 +0100)]
docs: cogl-texture-3d wasn't listed as experimental
The CoglTexture3D API is only available when defining
COGL_ENABLE_EXPERIMENTAL_API so it should be listed in the experimental
section of the API reference.
Robert Bragg [Wed, 25 Aug 2010 19:33:27 +0000 (20:33 +0100)]
docs: Use "Cogl" not "COGL" in Cogl API reference
Cogl isn't an acronym so we should use "Cogl" instead of "COGL" in
our documentation.
Emmanuele Bassi [Thu, 23 Sep 2010 14:15:37 +0000 (15:15 +0100)]
table-layout: Invert row/column in arguments
*** This is an API change ***
The general pattern for axis-aligned arguments is:
x argument
y argument
If we consider columns an x-aligned argument, and row a y-aligned
argument, then we need to update the TableLayout functions to be:
column
row
and not:
row
column
Emmanuele Bassi [Thu, 23 Sep 2010 12:36:56 +0000 (13:36 +0100)]
docs: Mention Uncrustify in the coding style document
Emmanuele Bassi [Thu, 23 Sep 2010 12:36:41 +0000 (13:36 +0100)]
Update the uncrustify configuration
Emmanuele Bassi [Thu, 23 Sep 2010 12:00:06 +0000 (13:00 +0100)]
Add uncrustify configuration file
Patch submission should include a pass of uncrustify to conform to the
coding style.
Uncrustify is not perfect - but at least it's a start.
Robert Bragg [Fri, 10 Sep 2010 23:29:05 +0000 (00:29 +0100)]
picking: Fix tracking of pick buffer validity
We have an optimization to track when there are multiple picks per
frame so we can do a full render of the pick buffer to reduce the
number of pick renders for a static scene.
There was a problem though in that we were tracking this information in
the ClutterMainContext, but conceptually this doesn't really make sense
because the pick buffer is associated with a stage framebuffer and there
can be multiple stages for one context.
This patch moves the state tracking to ClutterStage.
Robert Bragg [Thu, 23 Sep 2010 10:35:42 +0000 (11:35 +0100)]
Revert "picking: Fix tracking of pick buffer validity"
This reverts commit
d7e86e26960f4cb2f5f0600357f5df89bd1c46c1.
This was a half baked patch that was pushed a bit early since it broke
test-texture-pick-with-alpha + the commit message refers to a change on
the wip/paint-box branch that hasn't happened yet.
Robert Bragg [Fri, 10 Sep 2010 23:29:05 +0000 (00:29 +0100)]
picking: Fix tracking of pick buffer validity
We have an optimization to track when there are multiple picks per
frames so we can do a full render of the pick buffer to reduce the
number of pick renders for a static scene.
There were two problems with how we were tracking this state though.
Firstly we were tracking this information in the ClutterMainContext, but
conceptually this doesn't really make sense because the pick buffer is
associated with a stage framebuffer and there can be multiple stages for
one context. Secondly - since the change to how redraws are queued - we
weren't marking the pick buffer as invalid when a queuing a redraw, we
were only marking the buffer invalid when signaling/finishing the
queue-redraw process, which is now deferred until just before a paint.
This meant using clutter_stage_get_actor_at_pos after a scenegraph
change could give a wrong result if it just read from an existing (but
technically invalid) pick buffer.
This patch moves the state tracking to ClutterStage, and ensures the
buffer is invalidated in _clutter_stage_queue_actor_redraw.
http://bugzilla.clutter-project.org/show_bug.cgi?id=2283
Signed-off-by: Emmanuele Bassi <ebassi@linux.intel.com>
Emmanuele Bassi [Wed, 22 Sep 2010 11:46:47 +0000 (12:46 +0100)]
box-layout: Small cleanups
Emmanuele Bassi [Wed, 22 Sep 2010 09:07:42 +0000 (10:07 +0100)]
docs: Update the coding style
Make sure to document:
• nested if
• conditions
• interface definition
Neil Roberts [Tue, 21 Sep 2010 12:17:53 +0000 (13:17 +0100)]
test-conform: Delay initializing Clutter until a test is run
Instead of calling clutter_init immediately, test-conformance now only
calls it as part of test_conform_simple_fixture_setup. The conformance
tests assert that only one test is run per instance of
test-conformance so it should never end up calling clutter_init
twice. Delaying clutter_init has the advantage that calling
"test-conformance -l" will still work even on systems with no X
server. This could be useful for automated build systems.
Emmanuele Bassi [Tue, 21 Sep 2010 12:32:31 +0000 (13:32 +0100)]
effects: Make sure we're using GLSL 1.10
Emmanuele Bassi [Tue, 21 Sep 2010 12:17:51 +0000 (13:17 +0100)]
introspection: Build ClutterJson before Clutter
Since the latter requires the former.
Emmanuele Bassi [Tue, 21 Sep 2010 12:15:56 +0000 (13:15 +0100)]
Require the installed JSON-GLib
Continue to provide the internal copy for 1.4, but require an explicit
override to use it.
The internal copy will be removed for Clutter 1.6.
Emmanuele Bassi [Tue, 21 Sep 2010 11:02:41 +0000 (12:02 +0100)]
build: Update the remote publish path for the cookbook
Neil Roberts [Mon, 20 Sep 2010 11:04:51 +0000 (12:04 +0100)]
clutter-box-layout: Swap the default request mode
The request mode set by the box layout was previously width-for-height
in a vertical layout and height-for-width in a horizontal layout which
seems to be wrong. For example, if width-for-height is used in a
vertical layout then the width request will come second with the
for_height parameter set. However a vertical layout doesn't pass the
for_height parameter on to its children so doing the requests in that
order doesn't help. If the layout contains a ClutterText then both the
width and height request for it will have -1 for the for_width and
for_height parameters so the text would end up allocated too small.
http://bugzilla.clutter-project.org/show_bug.cgi?id=2328
Emmanuele Bassi [Mon, 20 Sep 2010 13:33:26 +0000 (14:33 +0100)]
Merge branch 'cookbook-layouts-bind-constraint'
* cookbook-layouts-bind-constraint:
cookbook: Add recipe about sync'ing actor sizes
cookbook: Example using allocation-changed to sync actor size
cookbook: Simple example to demonstrate bind constraint
cookbook: Example of using a bind constraint for an overlay
Emmanuele Bassi [Mon, 20 Sep 2010 13:31:53 +0000 (14:31 +0100)]
docs: Description fixes for State.set_animator()
Bastian Winkler [Fri, 17 Sep 2010 11:21:03 +0000 (13:21 +0200)]
state: Request the animator for the default state
Try to use the default-state animator in case there is no animator for
this specific state change request.
http://bugzilla.clutter-project.org/show_bug.cgi?id=2325
Bastian Winkler [Wed, 15 Sep 2010 13:59:39 +0000 (15:59 +0200)]
state: Fix the usage of ClutterAnimator in ClutterScript
Fix the transition parser to allow transitions that have only an
animator and no keys defined.
http://bugzilla.clutter-project.org/show_bug.cgi?id=2325
Bastian Winkler [Wed, 15 Sep 2010 12:46:19 +0000 (14:46 +0200)]
state: Create a new target state in clutter_state_set_animator
clutter_state_set_animator needs to create a new state in order to use a
ClutterAnimator with a target state that doesn't exist yet.
http://bugzilla.clutter-project.org/show_bug.cgi?id=2325
Dominique Leuenberger [Mon, 20 Sep 2010 13:13:49 +0000 (14:13 +0100)]
build: Pass CLUTTER_CFLAGS to g-ir-scanner
http://bugzilla.clutter-project.org/show_bug.cgi?id=2327
Signed-off-by: Emmanuele Bassi <ebassi@linux.intel.com>
Emmanuele Bassi [Mon, 20 Sep 2010 12:15:44 +0000 (13:15 +0100)]
docs: API reference fixes
Emmanuele Bassi [Mon, 20 Sep 2010 10:30:23 +0000 (11:30 +0100)]
build: Remove unnecessary newline
Frederik Hahne [Mon, 20 Sep 2010 10:23:31 +0000 (11:23 +0100)]
po: Update German translation
Emmanuele Bassi [Sat, 18 Sep 2010 07:41:52 +0000 (08:41 +0100)]
texture: Add more validation on the material
If set_cogl_texture() is called after unsetting the Texture's material
then we really want to make a copy of the template.
Also, we should assert more often if the internal state goes horribly
wrong: at least, we'll have a backtrace.
Neil Roberts [Fri, 17 Sep 2010 16:10:39 +0000 (17:10 +0100)]
Fix the ordering of the arguments for clutter_table_layout_set_span
The order of the row_span and column_span arguments was different in
the declaration from that in the definition. This was causing the
gtk-doc to also have the wrong order.
Neil Roberts [Fri, 17 Sep 2010 16:18:09 +0000 (17:18 +0100)]
cogl-object-private.h: Include cogl-debug.h
If COGL_OBJECT_DEBUG is defined then cogl-object-private.h will call
COGL_NOTE in the ref and unref macros. For this to work the debug
header needs to also be included or COGL_NOTE won't necessarily be
defined.
Elliot Smith [Thu, 16 Sep 2010 14:55:21 +0000 (15:55 +0100)]
cookbook: Add recipe about sync'ing actor sizes
The recipe covers how to use ClutterBindConstraint
to bind actor sizes together.
It gives some examples of where this approach is appropriate,
as well as explaining an alternative using allocation-changed
or notify::* signals.
Three examples are given:
1. Resizing a texture to the stage.
2. Resizing a rectangle to act as a transparent overlay on
top of a texture (using constraints).
3. Resizing a rectangle to act as a transparent overlay on
top of a texture, but with a size proportional to the texture
(using a handler connected to allocation-changed signals
emitted by the texture).
Elliot Smith [Thu, 16 Sep 2010 12:42:09 +0000 (13:42 +0100)]
cookbook: Example using allocation-changed to sync actor size
An alternative method (not using constraints) to bind
one actor's size and position to another. Used as
an example in the recipe about resizing one actor in
sync with a source actor.
Elliot Smith [Wed, 15 Sep 2010 15:05:15 +0000 (16:05 +0100)]
cookbook: Simple example to demonstrate bind constraint
A simple example showing how to scale an actor to the stage.
Demonstrates ClutterBindConstraint and ClutterAlignConstraint
in a fashion suitable for a short recipe.
Elliot Smith [Wed, 15 Sep 2010 14:50:32 +0000 (15:50 +0100)]
cookbook: Example of using a bind constraint for an overlay
Example code which loads an image into a texture, and resizes
the image in response to +/- key presses. The overlay is
a transparent rectangle which is bound to the height and
width of the texture; on clicking the texture, the overlay
is made visible by increasing its opacity.
This demonstrates how to use constraints to simplify code
for resizing an actor which is "dependent" on another actor.
Emmanuele Bassi [Fri, 17 Sep 2010 13:54:31 +0000 (14:54 +0100)]
docs: Add sub-classing notes on ActorMeta and Constraint
Emmanuele Bassi [Fri, 17 Sep 2010 11:43:23 +0000 (12:43 +0100)]
flow-layout: Blow the cached preferred size if needed
If the FlowLayout layout manager wasn't allocated the same size it
requested then it should blow its caches and recompute the layout
with the given allocation size.
Emmanuele Bassi [Fri, 17 Sep 2010 11:13:29 +0000 (12:13 +0100)]
constraint: Re-implement using update_allocation()
Instead of using the fixed position and size API, use the newly added
update_allocation() virtual function in ClutterConstraint to change the
allocation of a ClutterActor. This allows using constraints inside
layout managers, and also allows Constraints to react to changes in the
size of an actor without causing relayout cycles.
http://bugzilla.clutter-project.org/show_bug.cgi?id=2319
Emmanuele Bassi [Fri, 17 Sep 2010 11:09:56 +0000 (12:09 +0100)]
constraint: Add ::update_allocation()
The Constraint should plug directly into the allocation mechanism, and
modify the allocation of the actor to which they are applied to. This is
similar to the mechanism used by the Effect class to modify the paint
sequence of an actor.
Emmanuele Bassi [Fri, 17 Sep 2010 11:08:52 +0000 (12:08 +0100)]
test-bind: Fix colors and set the name of the boxes
Emmanuele Bassi [Fri, 17 Sep 2010 10:40:10 +0000 (11:40 +0100)]
build: Use the power of abs_builddir
When calling test-conformance to get the list of conformance tests.
Emmanuele Bassi [Fri, 17 Sep 2010 10:39:20 +0000 (11:39 +0100)]
build: Enable COGL_OBJECT_DEBUG in the debug flags
The CoglObject debugging code is enabled by a separate flag.
http://bugzilla.clutter-project.org/show_bug.cgi?id=2318
Robert Bragg [Thu, 16 Sep 2010 11:58:42 +0000 (12:58 +0100)]
offscreen-effect: Update handling of transforms
In line with the changes made in
f5f066df9ce7 to clean up how Clutter
deals with transformations of actors this patch updates the code in
clutter-offscreen-effect.c. We now query the projection matrix from the
stage instead of the perspective and instead of duplicating the logic to
setup the stage view transform we now use
_clutter_actor_apply_modelview_transform for the stage instead.
Neil Roberts [Thu, 16 Sep 2010 10:12:51 +0000 (11:12 +0100)]
clutter.modules: Specify the checkoutdir for the gtk2 module
If no checkoutdir is specified then jhbuild seems to use the name of
the module which in this case would be 'gtk+'. This ends up
overwriting the checkout of the master branch of gtk+ and causes all
kinds of build problems. This patch adds a checkoutdir attribute to
the gtk2 module to force it to checkout into the gtk2 directory.
Emmanuele Bassi [Wed, 15 Sep 2010 15:46:06 +0000 (16:46 +0100)]
Post-release version bump to 1.3.15
Emmanuele Bassi [Wed, 15 Sep 2010 15:12:39 +0000 (16:12 +0100)]
Release Clutter 1.3.14 (developers snapshot)
Emmanuele Bassi [Wed, 15 Sep 2010 14:56:42 +0000 (15:56 +0100)]
build: Add cogl-debug-options.h