Øyvind Kolås [Wed, 8 Apr 2009 17:18:31 +0000 (18:18 +0100)]
[group] avoid double evaluation of arguments in clutter_group_add
clutter_group_add would evaluate the actor argument twice, which is
bad if this is a function call creating a new actor and not a variable.
Neil Roberts [Tue, 7 Apr 2009 14:24:48 +0000 (15:24 +0100)]
Fix fullscreening when the stage is unrealized and on dual-head
If the stage is unrealized (such as will be the case if the stage was
created with clutter_stage_new) then it would set the size of the
stage display but it was not setting the fullscreen_on_map flag so it
never got the _NET_WM_STATE_FULLSCREEN property. Now it always sets
the flag regardless of whether the window is created yet.
There was also problems with dual-headed displays because in that case
DisplayWidth/Height will return the size of the combined display but
Metacity (and presumably other WMs) will sensibly try fit the window
to only one of the monitors. However we were setting the size hints so
that the minimum size is that of the combined display. Metacity tries
to honour this by setting the minimum size but then it no longer
positions the window at the top left of the screen.
The patch makes it avoid setting the minimum size when the stage is
fullscreen by checking the fullscreen_on_map flag. This also means we
can remove the static was_resizable flag which would presumably have
caused problems for multi-stage.
Neil Roberts [Mon, 6 Apr 2009 14:22:31 +0000 (15:22 +0100)]
[clutter-text] Add a separate property for the selection color
Adds a new property so that the selection color can be different from
the cursor color. If no selection color is specified it will use the
cursor color as before. If no cursor color is specified either it will
use the text color.
Neil Roberts [Mon, 6 Apr 2009 11:43:16 +0000 (12:43 +0100)]
[cogl-handle] Fix the broken debug macros
The debug macros for tracking reference counting of CoglHandles had
some typos introduced in c3d9f0 which meant it failed to compile when
COGL_DEBUG is 1.
Robert Bragg [Sat, 4 Apr 2009 18:02:01 +0000 (19:02 +0100)]
[cogl] cogl_is_*(): Don't dereference an invalid handle; just return FALSE
An invalid handle is implicitly not of any type.
Neil Roberts [Mon, 6 Apr 2009 10:14:43 +0000 (11:14 +0100)]
[cogl-pango-render] Fix returning to default color after a color attribute
Since the Cogl material branch merge when changing the color of a part
using pango attributes (such as using <span color="red" /> markup)
then it wouldn't return to the default color for the rest of the
layout. pango_renderer_get_color returns NULL if there is no color
override in which case it needs to revert to the color specified as
the argument to cogl_pango_render_layout. The 'color' member of
CoglPangoRenderer has been reinstated to store that default color and
now cogl_pango_render_set_color_for_part is the only place that sets
the material color.
Emmanuele Bassi [Sun, 5 Apr 2009 19:32:15 +0000 (20:32 +0100)]
[animation] Do not connect to ::completed multiple times
The clutter_actor_animate*() family of functions should only connect
to the Animation::completed signal once, during the construction of
the Animation object attached to the Actor. Otherwise, the completed
signal handler will be run multiple times, and will try to unref()
the Animation for each call -- leading to a segmentation fault.
Emmanuele Bassi [Fri, 3 Apr 2009 13:19:20 +0000 (14:19 +0100)]
[animation] Add the ::started signal
The Animation class is missing a ::started signal matching the
::completed one. A ::started signal is useful for debugging,
initial state set up, and checks.
Emmanuele Bassi [Fri, 3 Apr 2009 12:36:30 +0000 (13:36 +0100)]
[group] Fix compilation
A case of rebase FAIL. The sorting of the children was still
done using the now removed group function call instead of the
Container one.
Emmanuele Bassi [Fri, 3 Apr 2009 11:39:35 +0000 (12:39 +0100)]
[animation] Do not unref on ::complete by default
Bug 1535 - Complete animation always unrefs ClutterAnimation (even
after g_object_ref_sink)
Animations created through clutter_animation_new() should not
automagically unref themselves by default on ::complete. We
only want that behaviour for Animations created by the
clutter_actor_animate* family of functions, since those provide
the automagic memory management.
Emmanuele Bassi [Wed, 1 Apr 2009 10:22:42 +0000 (11:22 +0100)]
[group] Remove long deprecated API
ClutterGroup still ships with API deprecated since 0.4. We did
promise to keep it around for a minor release cycle -- not for 3.
Since we plan on shipping 1.0 without the extra baggage of the
deprecated entry points, here's the chance to remove the accumulated
cruft.
All the removed methods and signals have a ClutterContainer
counterpart.
Emmanuele Bassi [Wed, 1 Apr 2009 10:08:28 +0000 (11:08 +0100)]
[shader] Remove deprecated set_uniform_1f()
Since we're planning to release 1.0 without any of the deprecated
API baggage, we can simply remove the set_uniform_1f() method from
ClutterShader public API and add it to the deprecated header.
Robert Bragg [Wed, 1 Apr 2009 16:16:44 +0000 (17:16 +0100)]
[cogl-handle] Optimize how we define cogl handles
The cogl_is_* functions were showing up quite high on profiles due to
iterating through arrays of cogl handles.
This does away with all the handle arrays and implements a simple struct
inheritance scheme. All cogl objects now add a CoglHandleObject _parent;
member to their main structures. The base object includes 2 members a.t.m; a
ref_count, and a klass pointer. The klass in turn gives you a type and
virtual function for freeing objects of that type.
Each handle type has a _cogl_##handle_type##_get_type () function
automatically defined which returns a GQuark of the handle type, so now
implementing the cogl_is_* funcs is just a case of comparing with
obj->klass->type.
Another outcome of the re-work is that cogl_handle_{ref,unref} are also much
more efficient, and no longer need extending for each handle type added to
cogl. The cogl_##handle_type##_{ref,unref} functions are now deprecated and
are no longer used internally to Clutter or Cogl. Potentially we can remove
them completely before 1.0.
Robert Bragg [Thu, 2 Apr 2009 10:50:44 +0000 (11:50 +0100)]
[cogl] handle_automatic_blend_enable(): consider layers with invalid textures
A layer object may be instantiated when setting a combine mode, but before a
texture is associated. (e.g. this is done by the pango renderer) if this is the
case we shouldn't call cogl_texture_get_format() with an invalid cogl handle.
This patch skips over layers without a texture handle when determining if any
textures have an alpha channel.
Robert Bragg [Mon, 30 Mar 2009 16:07:31 +0000 (17:07 +0100)]
Unifies 90% of the code in {gl,gles}/cogl.c in common/cogl.c
This code keeps on diverging and we get bugs and fixes in one version but
not the other. This should make things a bit more maintainable.
Robert Bragg [Mon, 30 Mar 2009 15:41:02 +0000 (16:41 +0100)]
Removes cogl_blend_func prototype from cogl-internal.h
cogl_blend_func was removed a while ago so this was just a left over from then
Bastian Winkler [Mon, 30 Mar 2009 15:38:42 +0000 (17:38 +0200)]
[docs] Fix some inconsistency in Animation
For some examples of clutter_actor_animate the parameters of @mode and
@duration are swapped.
Signed-off-by: Emmanuele Bassi <ebassi@linux.intel.com>
Havoc Pennington [Mon, 30 Mar 2009 16:32:54 +0000 (17:32 +0100)]
[texture] Queue a relayout when changing :keep-aspect-ratio
Bug 1528 - queue relayout when setting ClutterTexture:keep-aspect-ratio
Signed-off-by: Emmanuele Bassi <ebassi@linux.intel.com>
Raymond Liu [Mon, 30 Mar 2009 15:57:11 +0000 (16:57 +0100)]
[text] Use the base class binding pool
Bug 1518 - [Patch] Widget derivied from ClutterText will crash on
key_press_event
In clutter_text_key_press() we are using G_OBJECT_TYPE_NAME to find
out the actor's type name. However, if some widget is derived from
ClutterText, when the key press handler is called, G_OBJECT_TYPE_NAME
will return the name of the derived widget.
The default implementation should get the binding pool for the base
class.
Signed-off-by: Emmanuele Bassi <ebassi@linux.intel.com>
Emmanuele Bassi [Mon, 30 Mar 2009 15:46:57 +0000 (16:46 +0100)]
[text] Different selection modes with multiple clicks
ClutterText should offer multiple selection modes depending on the
number of pointer clicks.
Following the GTK+ conventions:
- double click selects the current word
- triple click selects the current line
Øyvind Kolås [Mon, 30 Mar 2009 11:10:41 +0000 (12:10 +0100)]
[animation] add varargs support for signal::completed
Added support for registering a handler for the completed signal
directly amongst the varargs making it easier to attach code
to be executed when animations complete.
Emmanuele Bassi [Mon, 30 Mar 2009 06:54:42 +0000 (07:54 +0100)]
[text] Check text length in ::button-press-event
Bug 1529 - Selection bound out of sync with an empty Text actor
When the user clicks on a Text actor the cursor position and the
selection bound are set using bytes_to_offset(); if the Text is
empty, this means placing them both to 0. Setting the selection
bound to 0 means that when the user inserts a character by typing
it into the Text, the selection will be [0,1]; this will select
the first character, which will then be overwritten when typing
a new character.
The Text actor should, instead, check if there are no contents
and set the cursor position and the selection bound to -1.
The clutter_text_set_selection_bound() method should also validate
the value passed, in case it's bigger than the text lenght, or
smaller than -1.
Emmanuele Bassi [Fri, 27 Mar 2009 14:28:08 +0000 (14:28 +0000)]
[docs] Fix typo in the AnimationMode name
Chris Lord [Thu, 26 Mar 2009 20:28:04 +0000 (20:28 +0000)]
[ClutterTimeline] Fix clutter_timeline_set_delay
When setting a delay, timeout_add was being used with msecs. timeout_add
takes fps since the fix to bug #1495. Delay now uses g_timeout_add
instead.
Damien Lespiau [Wed, 25 Mar 2009 20:58:22 +0000 (20:58 +0000)]
[gitignore] Ignore two newly introduced tests
Neil Roberts [Wed, 25 Mar 2009 14:53:58 +0000 (14:53 +0000)]
[doc] Fix two small typos in cogl-vertex-buffer
The symbol name for cogl_vertex_buffer_draw_elements was wrong so it
ended up with no documentation. The name for the vertex attribute was
incorrect in cogl_vertex_buffer_add.
Robert Bragg [Mon, 23 Mar 2009 12:46:20 +0000 (12:46 +0000)]
[build] Fixes a cogl-vertex-buffer.c warning when building for GLES
GLES 1 doesn't support GLSL so it never needs to use the generic_index
variable for generic attributes which was flagging a warning.
Robert Bragg [Mon, 23 Mar 2009 12:29:15 +0000 (12:29 +0000)]
[cogl] Move rect and poly drawing code from cogl-texture.c to cogl-primitives.c
None of this code directly related to implementing CoglTextures, and the
code was needlessly duplicated between the GL and GLES backends. This moves
the cogl_rectangle* and cogl_polygon* code into common/cogl-primitives.c
makes which makes lot of sense since the two copies keep needlessly
diverging introducing or fixing bugs in one but not the other. For instance
I came accross one such bug regarding the enabling of texture units when
unifying the code.
Robert Bragg [Mon, 23 Mar 2009 11:39:40 +0000 (11:39 +0000)]
[cogl_rectangles] A minor doc fix, and missing newline between functions
The gtk-doc had a copy and paste error, saying the float array should be 8
elements per rectangle instead of 4. There was also no newline in the gles
code before the new function.
Johan Bilien [Fri, 20 Mar 2009 19:22:23 +0000 (19:22 +0000)]
Allow using array of vertices even without textures
It's often nice to be able to draw a batch of vertices, even if these
have no texture coordinates. This add a cogl_rectangles, similar to
cogl_rectangles_with_texture_coords, only without.
Robert Bragg [Thu, 19 Mar 2009 16:46:07 +0000 (16:46 +0000)]
Removes a hack in gles/cogl.c that was already fixed in gl/cogl.c
It removes the need to cast a CoglMatrix to a float * for transforming
a vertex manually instead of using cogl_matrix_transform_point.
Emmanuele Bassi [Thu, 19 Mar 2009 11:40:13 +0000 (11:40 +0000)]
[doc] Update the should_pick_paint() documentation
The should_pick_paint() method of ClutterActor is not clearly
documented.
Neil Roberts [Thu, 19 Mar 2009 17:54:17 +0000 (17:54 +0000)]
[glx-texture-pixmap] Don't enable the texture target when binding the texture
There's no need to enable the texture target unless it is going to be
used for rendering. Enabling it directly with glEnable calls confuses
Cogl's state caching.
This is a replacement for the patch in bug 1483 which was reverted.
Neil Roberts [Thu, 19 Mar 2009 17:48:15 +0000 (17:48 +0000)]
Revert "Use COGL to establish GL state for ClutterGLXTexturePixmap"
This reverts commit
f9d996a4603bef1f52e32e99f9f69a32b7c823ba.
The change from calling glBindTexture to using the material API with
cogl_material_flush_gl_state does not always work because it doesn't
necessarily leave the active texture unit as GL_TEXTURE0. For example,
if the previously rendered texture was multi-layered then the last
thing cogl_material_flush_gl_state will do is select GL_TEXTURE1 just
to disable it.
Øyvind Kolås [Thu, 19 Mar 2009 14:42:50 +0000 (14:42 +0000)]
[actor] use an epsilon whens sanity checking sizes
Clutter was complaining about netural width smaller than minimum widths
(differences around 0.0005) by using an epsilon value of 1e-4 for these
floating point comparisons, these warnings have now been silenced.
Emmanuele Bassi [Wed, 18 Mar 2009 17:07:50 +0000 (17:07 +0000)]
[docs] Remove unused arguments
The documentation for some X11TexturePixmap method does not reflect
the actual API.
Emmanuele Bassi [Wed, 18 Mar 2009 17:06:56 +0000 (17:06 +0000)]
[docs] Pick up backend-specific API
The various backend API outside from clutter-x11.h and clutter-win32.h
is documented but not picked up by gtk-doc.
Emmanuele Bassi [Tue, 17 Mar 2009 14:12:01 +0000 (14:12 +0000)]
Remove usage of the grave accent as quotation mark
See:
http://www.cl.cam.ac.uk/~mgk25/ucs/quotes.html
This should make Thomas happy.
Robert Bragg [Tue, 17 Mar 2009 00:12:27 +0000 (00:12 +0000)]
[cogl] Apply the fix from
2c1c836417 (Flush matrix before clip planes) to GLES
glClipPlane() is affected by modelview matrix so we need to flush before
calling it.
Robert Bragg [Tue, 17 Mar 2009 00:26:38 +0000 (00:26 +0000)]
[test-cogl-vertex-buffer] Use clutter_color_from_hls instead of hsl_to_rgb
There is no need for a custom hsl to rgb converter since Clutter implements
this logic; originally it wasn't quite as optimal, but that has now been
fixed.
Robert Bragg [Tue, 17 Mar 2009 00:01:56 +0000 (00:01 +0000)]
[clutter-color] Use a different hls->rgb algorithm + use floating point
Using test-cogl-vertex-buffer as a test case which is CPU bound due to
hls -> rgb conversions this alternative algorithm looked to be ~10%
faster when tested on an X61s Lenovo.
Emmanuele Bassi [Mon, 16 Mar 2009 18:20:58 +0000 (18:20 +0000)]
[docs] More information on animation queueing
Queuing an animation on an actor cannot be done from within the
::completed signal handler, because we guarantee that the Animation
instance is valid and attached to the actor it animates for the
whole duration of the signal emission chain.
In order to queue animations you have to install an idle handler
on the main loop, and call clutter_actor_animate() inside it.
The documentation should be more clear about this caveat in the
memory management of ClutterAnimations created by the animate()
family of functions.
Emmanuele Bassi [Mon, 16 Mar 2009 17:09:57 +0000 (17:09 +0000)]
Post-release bump to 0.9.3
Emmanuele Bassi [Mon, 16 Mar 2009 16:28:45 +0000 (16:28 +0000)]
[release] Release 0.9.2
Emmanuele Bassi [Mon, 16 Mar 2009 16:14:12 +0000 (16:14 +0000)]
Update release notes
Emmanuele Bassi [Mon, 16 Mar 2009 16:55:48 +0000 (16:55 +0000)]
[docs] Ignore the TimeoutInterval internal API
The TimeoutInterval API is internal, and thus should not be part
of the API reference.
Emmanuele Bassi [Mon, 16 Mar 2009 16:54:58 +0000 (16:54 +0000)]
[docs] Fix naming of the interval parameter
The interval parameter is now expressed in frames per second and not
in milliseconds.
Emmanuele Bassi [Mon, 16 Mar 2009 16:09:05 +0000 (16:09 +0000)]
Fix release date of 0.9.0
Robert Bragg [Mon, 16 Mar 2009 14:58:00 +0000 (14:58 +0000)]
[cogl] Don't endlessly print the same warning regarding layer fallbacks
There are various constraints for when we can support multi-texturing and
when they can't be met we try and print a clear warning explaining why the
operation isn't supported, but we shouldn't endlessly repeat the warning for
every primitive of every frame. This patch fixes that.
Robert Bragg [Mon, 16 Mar 2009 12:47:45 +0000 (12:47 +0000)]
[tests] Adds an interactive cogl vertex buffer unit test
The test is a sanity check that dynamic updating of vertex data via the cogl
vertex buffer api works and has reasonable performance. (though it can't be
considered a well designed benchmark since it wastes casual amounts of CPU
time simply choosing pretty colors.)
The code also aims to demonstrate one way of creating, updating and efficiently
drawing a quad mesh structure via the vertex buffer api which could be applied
to lots of different use cases.
Robert Bragg [Mon, 9 Mar 2009 10:26:31 +0000 (10:26 +0000)]
[cogl-vertex-buffer] fix cogl_vertex_buffer_draw_elements prototype
This function was renamed a while ago in the .c file from
cogl_vertex_buffer_draw_range_elements but the corresponding .h and
doc/reference/cogl changes weren't made.
Robert Bragg [Sat, 28 Feb 2009 17:39:38 +0000 (17:39 +0000)]
[cogl-vertex-buffer] Allow querying back the number of vertices a buffer represents
This may be convenient e.g. at draw time if you are simply drawing all vertices
Robert Bragg [Sat, 28 Feb 2009 17:36:25 +0000 (17:36 +0000)]
[cogl-vertex-buffer] Add a flush of attribute changes in the *_draw() functions
For convenience it is now valid to avoid a seperate call to
cogl_vertex_buffer_submit() and assume that the _draw() calls will do this
for you (though of course if you do this you still need to ensure the
attribute pointers remain valid until your draw call.)
Neil Roberts [Mon, 9 Mar 2009 17:12:27 +0000 (17:12 +0000)]
Count timeline frames using the FPS instead of an integer interval
Bug 1495 - Timelines run 4% short
Previously the timelines were timed by calculating the interval
between each frame stored as an integer number of milliseconds so some
precision is lost. For example, requesting 60 frames per second gets
converted to 16 ms per frame which is actually 62.5 frames per
second. This makes the timeline shorter by 4%.
This patch merges the common code for timing from the timeout pools
and frame sources into an internal clutter-timeout-interval file. This
stores the interval directly as the FPS and counts the number of
frames that have been reached instead of the elapsed time.
Havoc Pennington [Mon, 16 Mar 2009 15:09:33 +0000 (15:09 +0000)]
[cogl] Flush matrix before clip planes
glClipPlane() is affected by modelview matrix so we need to flush
before calling it.
Signed-off-by: Emmanuele Bassi <ebassi@linux.intel.com>
Emmanuele Bassi [Mon, 16 Mar 2009 15:00:55 +0000 (15:00 +0000)]
[docs] Bring down the undocumented symbols to 2%
The usual pre-release documentation blitzing. Most of the remaining
symbols are either COGL or X11 specific, or dummy interface typedefs.
Emmanuele Bassi [Mon, 16 Mar 2009 14:16:18 +0000 (14:16 +0000)]
[animation] Enhance consistency of the Animation API
The Animation API should follow this pattern:
- functions with an Interval as part of the arguments should have
"interval" inside their name, e.g.:
clutter_animation_bind_interval
clutter_animation_update_interval
- functions dealing with property names should have "property"
inside their name, e.g.:
clutter_animation_has_property
clutter_animation_unbind_property
- unless -
- functions dealing with a property and its value should not
have any modifier, e.g.:
clutter_animation_bind
The change from update_property() to update_interval() frees up
clutter_animation_update(), to be added at a later date.
Emmanuele Bassi [Mon, 16 Mar 2009 14:02:09 +0000 (14:02 +0000)]
[docs] Update after Animation API changes
Rename the bind/unbind_property functions, and add the bind_interval,
completed method.
Also, add clutter_actor_get_animation().
Emmanuele Bassi [Mon, 16 Mar 2009 14:01:43 +0000 (14:01 +0000)]
[docs] Add description of queue_redraw
Emmanuele Bassi [Mon, 16 Mar 2009 12:17:03 +0000 (12:17 +0000)]
[tests] Remove unused variables
The size of the pixmap is passed by the ::size-changed signal, so
we can remove the unused w, h variables and avoid a compiler warning.
Havoc Pennington [Tue, 17 Feb 2009 17:22:02 +0000 (12:22 -0500)]
[actor] Add ::queue-redraw signal
Bug 1454 - move queue_redraw virtualization to ClutterActor
The ClutterActor::queue-redraw signal allows parent containers to
track whether their children need a redraw.
Signed-off-by: Emmanuele Bassi <ebassi@linux.intel.com>
Havoc Pennington [Mon, 16 Mar 2009 11:58:58 +0000 (11:58 +0000)]
[actor] Add :clip-to-allocation property
A common use of setting clip is to keep an actor inside its allocation;
right now to do this you have to set up a callback on notify::allocation.
There's no overhead added by sticking another bit in ClutterActor
clip-to-allocation that will clip painting to the allocation if set.
Signed-off-by: Emmanuele Bassi <ebassi@linux.intel.com>
Colin Walters [Fri, 6 Mar 2009 04:10:00 +0000 (23:10 -0500)]
[animation] Enhance the bind API
Bug 1419 - Add clutter_animation_bind, rename clutter_animation_bind_interval
This is a different approach from the clutter_actor_animatev
vector variant. The single call should be even easier on
automatic bindings, since calls can be chained like:
new Clutter.Animation({object: myactor}).bind("x", 42).bind("y", 43);
Note clutter_animation_bind_property which took a ClutterInterval
is renamed to clutter_animation_bind_interval for clarity, and to
discourage use since there are friendlier APIs about.
Signed-off-by: Emmanuele Bassi <ebassi@linux.intel.com>
Emmanuele Bassi [Mon, 16 Mar 2009 11:31:27 +0000 (11:31 +0000)]
[animation] Add Animation getter
If we are animating an actor using the clutter_actor_animate*() family
of functions we might want to expose a getter for the Animation instance
we are using, to avoid excessing bookkeeping.
Emmanuele Bassi [Mon, 16 Mar 2009 11:30:10 +0000 (11:30 +0000)]
[animation] Add an emitter for ::completed
The ::completed signal requires an emitter in case we want to stop
the animation and safely dispose it inside application code without
breaking invariants.
Emmanuele Bassi [Mon, 16 Mar 2009 11:28:29 +0000 (11:28 +0000)]
[docs] Clarify Animation memory management
The memory management of the ClutterAnimation instances should be
heavily documented, given its "automagical" nature, so that other
people might understand it and avoid breaking it in the future.
Øyvind Kolås [Mon, 16 Mar 2009 00:40:27 +0000 (00:40 +0000)]
Merge branch 'async-texture-thread-pool'
Øyvind Kolås [Thu, 12 Mar 2009 11:48:44 +0000 (11:48 +0000)]
[clutter-texture] fixed gtk-doc formatting, and init threads in test.
Fixed markup to actually work with gtk-doc, also do a g_thread_init
in the test.
Neil Roberts [Fri, 13 Mar 2009 15:43:19 +0000 (15:43 +0000)]
[cogl-path] Minor fix to gtk-doc
Fix the parameters in cogl_path_curve_to and cogl_path_rel_curve_to to
match the actual names otherwise they won't appear correctly in the
docs.
Emmanuele Bassi [Fri, 13 Mar 2009 15:28:20 +0000 (15:28 +0000)]
[cogl] Avoid shadowing math.h symbols
As usual, y1 and y2 end up shadowing symbols exported by math.h.
Owen W. Taylor [Thu, 12 Mar 2009 19:33:36 +0000 (15:33 -0400)]
Avoid drawing twice if relayout queues a draw
It's reasonably normal for a relayout of the stage to cause the stage
to be queued for drawing; for this reason we should do the relayout before
we clear stage->update_idle. (But want to clear update_idle() before actually
doing the redraw to handle the corner case where the draw queues another
redraw.)
Emmanuele Bassi [Fri, 13 Mar 2009 14:14:00 +0000 (14:14 +0000)]
Do not cause more size requisitions than necessary
Bug 1499 - clutter_actor_notify_if_geometry_changed causes sync
layout cycles
Whenever clutter_actor_set_{width,height,x,y,size...} is used, extra
synchronous size requests are triggered in
clutter_actor_notify_if_geometry_changed.
If the get_preferred_width() and get_preferred_height() implementations
are particularly costly (e.g. ClutterText) this will result in a performance
impact.
To avoid excessive allocation or requisition cycles we use the
cached values and flags. If we don't have an allocation, we assume
that we need to notify all the properties; if we don't have a size
requisition we notify only width and height; finally, if we do have
a valid allocation we notify only on the changed values.
Emmanuele Bassi [Thu, 12 Mar 2009 21:11:50 +0000 (21:11 +0000)]
[deprecated] Add Effect deprecation
The ClutterEffect API has been deprecated during 0.9, so it should be
added to the deprecation macros.
Emmanuele Bassi [Thu, 12 Mar 2009 16:20:42 +0000 (16:20 +0000)]
Add more deprecation notices
Most of the deprecated API does not have an entry inside
clutter-deprecated.h, thus making porting a tad more difficult.
Neil Roberts [Fri, 13 Mar 2009 12:20:26 +0000 (12:20 +0000)]
Change cogl_path_rectangle and cogl_path_round_rectangle to take x1,y1,x2,y2
This matches the changes to cogl_rectangle to improve consistency.
Neil Roberts [Fri, 13 Mar 2009 12:02:33 +0000 (12:02 +0000)]
[README] Small typo fix
Robert Bragg [Thu, 12 Mar 2009 18:59:20 +0000 (18:59 +0000)]
Merge branch 'cogl-client-matrix-stacks'
* cogl-client-matrix-stacks:
Maintain the Cogl assumption that the modelview matrix is normally current
Finish GLES{1,2} support for client side matrix stacks
Explicitly make the modelview-matrix current in cogl_{rotate,transform,etc}
Avoid casting CoglMatrix to a GLfloat * when calling glGetFloatv
Removes need for casting const float * in _cogl_set_clip_planes
Virtualize GL matrix operations and use a client-side matrix when GL is indirect
Robert Bragg [Thu, 12 Mar 2009 14:16:48 +0000 (14:16 +0000)]
Maintain the Cogl assumption that the modelview matrix is normally current
_cogl_add_path_to_stencil_buffer and _cogl_add_stencil_clip were leaving
the projection matrix current when calling cogl_rectangle which was
upsetting _cogl_current_matrix_state_flush.
Robert Bragg [Thu, 12 Mar 2009 13:34:36 +0000 (13:34 +0000)]
Finish GLES{1,2} support for client side matrix stacks
Adds glFrustum wrappers (GLES only accepts floats not doubles, and GLES2
needs to use our internal cogl_wrap_glFrustumf)
Adds GL_TEXTURE_MATRIX getter code in cogl_wrap_glGetFloatv
Adds a GL_TEXTURE_MATRIX define for GLES2
Robert Bragg [Thu, 12 Mar 2009 13:32:10 +0000 (13:32 +0000)]
Use Cogl enum when making modelview-matrix current in cogl_{rotate,transform,etc}
My previous patch incorrectly used the GL enum with the _cogl_set_current_matrix
API.
Robert Bragg [Fri, 6 Mar 2009 03:43:24 +0000 (03:43 +0000)]
Explicitly make the modelview-matrix current in cogl_{rotate,transform,etc}
Its not intended that users should use these with any other matrix mode, and
internally we now have the _cogl_current_matrix API if we need to play with
other modes.
Robert Bragg [Fri, 6 Mar 2009 03:29:51 +0000 (03:29 +0000)]
Avoid casting CoglMatrix to a GLfloat * when calling glGetFloatv
If we later add internal flags to CoglMatrix then this code wouldn't
initialize those flags. The ways it's now done adds a redundant copy, but
if that turns out to be something worth optimizing we can look again at
using a cast but adding another way for initializing internal flags.
Robert Bragg [Fri, 6 Mar 2009 03:29:35 +0000 (03:29 +0000)]
80 char fix
Robert Bragg [Fri, 6 Mar 2009 02:39:24 +0000 (02:39 +0000)]
Removes need for casting (const float *) to (GLfloat *) in _cogl_set_clip_planes
This removes cogl.c:apply_matrix(), and makes cogl.c:project_vertex() use
cogl_matrix_transform_point instead.
Havoc Pennington [Tue, 24 Feb 2009 18:51:25 +0000 (13:51 -0500)]
Virtualize GL matrix operations and use a client-side matrix when GL is indirect
This is useful because sometimes we need to get the current matrix, which
is too expensive when indirect rendering.
In addition, this virtualization makes it easier to clean up the API in
the future.
Øyvind Kolås [Thu, 12 Mar 2009 11:48:44 +0000 (11:48 +0000)]
[clutter-texture] updated documentation.
Rewrote documentation, with the smallest amount of documentation for
load-data-async which is considered a special case of load-async.
Øyvind Kolås [Thu, 12 Mar 2009 11:18:11 +0000 (11:18 +0000)]
Merge commit 'origin/async-texture-thread-pool' into async-size
Øyvind Kolås [Thu, 12 Mar 2009 10:38:39 +0000 (10:38 +0000)]
[clutter-texture] remove load-size-async property
Only have load-data-async and load-async properties, both are construct
only and the latter adds the former load-size-async behavior on top of
load-data-async.
Øyvind Kolås [Thu, 12 Mar 2009 10:14:40 +0000 (10:14 +0000)]
[clutter-texture] add option to not block on size for loaded images
Added a construct time property to indicate that we do not want
to block on loading images.
Øyvind Kolås [Wed, 11 Mar 2009 18:26:30 +0000 (18:26 +0000)]
[tests] Added test-texture-async
Emmanuele Bassi [Thu, 12 Mar 2009 09:29:39 +0000 (09:29 +0000)]
[docs] Add a bindings coding practices
When writing language bindings for Clutter some rules should be
observed to guarantee the same levels of quality across different
bindings.
Emmanuele Bassi [Thu, 12 Mar 2009 09:27:39 +0000 (09:27 +0000)]
[docs] Reword some of the coding practices
Update with the new fixed point and units rules. Also, fix the
grammar and clarify what to do with non-static private functions.
Emmanuele Bassi [Wed, 11 Mar 2009 22:12:36 +0000 (22:12 +0000)]
[tests] Animate the color during easing
The easing modes test should also tweak the color to show the
progress of the animation.
Geoff Gustafson [Tue, 10 Mar 2009 21:25:37 +0000 (14:25 -0700)]
[animation] Broken fixed:: properties
This commit yesterday:
89e3e3a4cc06c10c2573f3d115c5b03ee4890524
[animation] Add vector variants for ::animate()
broke the "fixed::" attribute on properties in clutter_actor_animate(),
because the fixed:: part is still on the string when it checks to see if
it's a valid property the class knows about.
Signed-off-by: Emmanuele Bassi <ebassi@linux.intel.com>
Damien Lespiau [Wed, 11 Mar 2009 18:39:10 +0000 (18:39 +0000)]
Update shave
This update fixes a few issues:
- the use of shave with mingw32 bash on windows,
- fix the unmangling of libtool names
- fix build on solaris
- add an --enable/disable-shave configure option (while still
defaulting to enabled)
Owen W. Taylor [Fri, 27 Feb 2009 16:56:39 +0000 (11:56 -0500)]
Allow NULL for clutter_text_set_text()
As a convenience, if NULL is passed for the text argument of
clutter_text_set_text() (and for consistency,
clutter_text_set_markup()), treat that the same as "".
Gordon Williams [Wed, 11 Mar 2009 18:16:21 +0000 (18:16 +0000)]
[group] Output the group name when debugging paint
Bug 1480 - Clutter groups don't output their name when
CLUTTER_DEBUG=paint
This is a really useful thing to do debugging-wise - as you can see
istantly when (and if) clutter objects are being drawn - as often
there's quite a hierarchy of objects in groups.
Signed-off-by: Emmanuele Bassi <ebassi@linux.intel.com>
Owen W. Taylor [Thu, 26 Feb 2009 19:42:19 +0000 (14:42 -0500)]
Add (out) annotations for ClutterActor
Add missing (out) annotations to the doc comments for ClutterActor methods
with multiple return values.
Fix the definition of clutter_actor_get_allocation_vertices() to be
consistent with the declaration and have verts[4] rather than verts[].x
http://bugzilla.openedhand.com/show_bug.cgi?id=1481
Raymond Liu [Mon, 9 Mar 2009 06:10:45 +0000 (14:10 +0800)]
[text] Insertion of multi-byte characters broken
Bug 1501 - clutter_text_insert_text not working right with non-onebyte
character
In clutter_text_insert_text(), the position is expressed in characters, not
in bytes.
Actually, it turns out to be working on bytes, so when there are already
multi-byte character in the text buffer, insert text at the position after
the multi-byte character will not work right.
Also, the position is not updated after the insert work is done.
Signed-off-by: Emmanuele Bassi <ebassi@linux.intel.com>
Raymond Liu [Wed, 11 Mar 2009 06:35:26 +0000 (14:35 +0800)]
[text] Crash when multi-byte utf8 text exceeds max_length
Bug 1500 - [Patch] clutter_text crash with non one-byte utf8 text exceed
max_length
In clutter_text_set_text_internal(), when text length in character is greater
than max_length, and there are multi-byte character in it, then the new text
string buffer is not malloc()'ed with right length. This will cause the app to
crash with segmention fault.
Signed-off-by: Emmanuele Bassi <ebassi@linux.intel.com>