Emmanuele Bassi [Thu, 8 Jan 2009 13:31:27 +0000 (13:31 +0000)]
[docs] Add ClutterAnimatable to the API reference
Emmanuele Bassi [Thu, 8 Jan 2009 13:18:00 +0000 (13:18 +0000)]
Add license notice to ClutterAnimation files
Emmanuele Bassi [Thu, 8 Jan 2009 12:59:16 +0000 (12:59 +0000)]
[animation] Use ClutterAnimatable inside Animation
ClutterAnimation should check if the object is implementing the
Animatable interface, and if so delegate to it the computation
of the value along the interval initial and final value, depending
on the progress.
Emmanuele Bassi [Thu, 8 Jan 2009 12:56:46 +0000 (12:56 +0000)]
[animation] Add ClutterAnimatable
The ClutterAnimatable interface is meant to be used by GObject
classes to override the value computation for an animatable
property within the boundaries of an interval.
It is composed of a single virtual function, animate_property();
its implementation will receive the ClutterAnimation used to
animate the object; the property name; the initial and final
interval values; and the progress factor as retrieved by the
Alpha object bound to the Animation instance.
Emmanuele Bassi [Thu, 8 Jan 2009 11:15:09 +0000 (11:15 +0000)]
[animation] Allow registering custom progress function
A ClutterInterval can change the way the progress is computed
by subclassing and overriding the ::compute_value() virtual function.
It should also be possible to register a custom progress function
in the same way it is possible to register a custom transformation
function between two GValues.
This commit adds an internal, global hash table that maintains a
GType <-> progress function association; each ClutterInterval
will check if there is a progress function registered for the
GType of the initial and final values of the interval and, if
it has been found, it will call it to compute the value of the
interval depending on the progress factor.
Emmanuele Bassi [Wed, 7 Jan 2009 18:18:59 +0000 (18:18 +0000)]
[animation] Interval::compute_value should return a boolean
If the computation of the interval value depending on the progress
was not successful, ClutterInterval::compute_value() should return
this information to the caller.
Emmanuele Bassi [Tue, 6 Jan 2009 12:53:30 +0000 (12:53 +0000)]
Animate ClutterColor properties
We can animate a ClutterColor-based property between an interval
of two colors by simply applying the factor to each color component.
Neil Roberts [Mon, 5 Jan 2009 13:14:12 +0000 (13:14 +0000)]
Fix some animation_set_* functions so they cope if the value is the same
The following functions are fixed:
clutter_animation_set_actor
clutter_animation_set_timeline
clutter_animation_set_alpha
This is related to bug 1392 which discusses the problem for
behaviour_set_alpha.
Neil Roberts [Mon, 5 Jan 2009 12:05:51 +0000 (12:05 +0000)]
Fix some *_set functions so they work if the object is the same value
Bug 1392 - behaviour_set_alpha set same alpha twice lead to warning
and destroy the input alpha
The following functions are fixed:
clutter_actor_set_shader
clutter_alpha_set_timeline
clutter_behaviour_set_alpha
clutter_clone_texture_set_parent_texture
They either now reference the new value before destroying the old
value, or just return immediately if the values are the same.
Neil Roberts [Mon, 5 Jan 2009 12:52:46 +0000 (12:52 +0000)]
Fix setting the mode on a ClutterAlpha created with animation_set_alpha(NULL)
It previously attempted to set the mode on the alpha using
clutter_animation_set_mode_internal, but this was setting the mode on
priv->alpha. At that point in the code priv->alpha is always NULL.
clutter_animation_set_mode_internal now takes a parameter to specify
which alpha to modify.
Neil Roberts [Mon, 5 Jan 2009 12:47:10 +0000 (12:47 +0000)]
In clutter_alpha_set_mode, set priv->mode after setting the func
Otherwise the call to clutter_alpha_set_func sets the mode back to
CLUTTER_CUSTOM_MODE so clutter_alpha_get_mode won't get back the same
value that was set.
Emmanuele Bassi [Mon, 5 Jan 2009 11:11:10 +0000 (11:11 +0000)]
Merge branch 'units-rework'
* units-rework:
[texture] Do not mix fixed point and units values
[tests] Fix the actor detection
[units] Do not use fixed point and units interchangeably
Robert Bragg [Tue, 23 Dec 2008 16:29:29 +0000 (16:29 +0000)]
White space clean up across a number of files (only removing trailing spaces)
Removed trailing white space from the following files:
- clutter-clone-texture.c
- clutter-texture.c
- clutter-texture.h
- cogl/cogl-texture.h
- cogl/gl/cogl-context.c
- cogl/gl/cogl-texture.c
- cogl/gl/cogl-context.h
Emmanuele Bassi [Tue, 23 Dec 2008 21:06:05 +0000 (21:06 +0000)]
Remove a masking with index()
The binding-pool test unit had a variable masking the index() function
declared inside string.h.
Emmanuele Bassi [Tue, 23 Dec 2008 20:55:35 +0000 (20:55 +0000)]
Fix an empty block
Remove a stray ';' that prevented the get_bounds() method of the
ClutterBehaviourRotate to correctly return the start angle value.
Emmanuele Bassi [Tue, 23 Dec 2008 20:53:44 +0000 (20:53 +0000)]
Add more maintainer CFLAGS
Be even more anal-retentive when the maintainer flags are enabled.
Kudos to Benjamin Otte.
Owen Taylor [Mon, 22 Dec 2008 13:11:59 +0000 (13:11 +0000)]
Return something reasonable from clutter_x11_handle_event()
Instead of returning CLUTTER_X11_FILTER_CONTINUE always from
clutter_x11_handle_event() return CLUTTER_X11_FILTER_REMOVE if
the event was on a stage and translated to a ClutterEvent.
Signed-off-by: Emmanuele Bassi <ebassi@linux.intel.com>
Robert Bragg [Sun, 21 Dec 2008 21:12:43 +0000 (21:12 +0000)]
[gitignore] Adds *.swn + *.swo (Vim files) & *.orig + *.reg (patch conflicts)
Robert Bragg [Sun, 21 Dec 2008 21:08:10 +0000 (21:08 +0000)]
[build] Replaces use of #include <cairo/cairo.h> with #include <cairo.h>
The cairo pkg-config is crafted such that #include <cairo.h> should be used.
If building with a private build of cairo installed to a custom prefix
<cairo/cairo.h> can cause an un-intended cairo header to be picked up during
compilation due to /usr/include being in the header search path.
Robert Bragg [Fri, 19 Dec 2008 21:31:18 +0000 (21:31 +0000)]
[tests] Ensures that test-viewport.c is built
test-viewport.c wasn't listed correctly in the UNIT_TESTS variable
(it was missing the .c extension, and so it wasn't being built.)
Robert Bragg [Fri, 19 Dec 2008 21:22:45 +0000 (21:22 +0000)]
[tests] Ensure that test-launcher.sh is found for out of tree builds
When building out of tree the generated scripts for the unit tests
need to explicitly reference the original src dir to be able to find
test-launcher.sh, like this:
$(top_srcdir)/tests/conform/test-launcher.sh
Also test-launcher.sh now passes -m slow --verbose to gtester. Without
-m slow then the wrappers dont work for some of the timeline tests.
Emmanuele Bassi [Fri, 19 Dec 2008 18:21:36 +0000 (18:21 +0000)]
Avoid masking math.h exported variables
Our beloved math.h exports, from bits/mathcalls.h, a bare "y1" symbol.
Apparently, it's unthinkable for code including <math.h> to also declare
arguments or variable named "y0", "y1" and "yn".
Anyway, the quick fix already used elsewhere in Clutter's codebase is
to rename the colliding variables "y_0", "y_1" and "y_n" - and
obviously everything similar to them as well, using the same pattern.
Emmanuele Bassi [Fri, 19 Dec 2008 17:49:57 +0000 (17:49 +0000)]
[docs] Remove a duplicate definition
ClutterScriptable was defined twice inside the sections file.
Emmanuele Bassi [Fri, 19 Dec 2008 17:48:30 +0000 (17:48 +0000)]
[docs] Documentation fixes for CairoTexture
Sync up the arguments name inside the gtk-doc annotations with their
name inside the function declaration in the header file.
Emmanuele Bassi [Fri, 19 Dec 2008 17:44:24 +0000 (17:44 +0000)]
Whitespace fixes
Let's try to honour the coding style document, now that we have one.
Emmanuele Bassi [Fri, 19 Dec 2008 17:41:44 +0000 (17:41 +0000)]
[docs] Parameter naming fixes
The name of the parameter in the header and the one in the gtk-doc
annotation on top of a function must match.
Unfortunately, there is an index() function declared inside strings.h
which makes gcc complain for the "index" argument as soon as we
enable the extra compiler flags we use when distchecking.
Hence, we need to rename "index" to "index_" in the header and in
the source files.
Emmanuele Bassi [Fri, 19 Dec 2008 17:30:50 +0000 (17:30 +0000)]
[docs] Add last few missing symbols to the sections file
Emmanuele Bassi [Fri, 19 Dec 2008 17:28:42 +0000 (17:28 +0000)]
[docs] Add shader symbols to their sections
Emmanuele Bassi [Fri, 19 Dec 2008 17:25:18 +0000 (17:25 +0000)]
[docs] Add ClutterPath unused symbols
Add the symbols that gtk-doc can track to the sections file.
Emmanuele Bassi [Fri, 19 Dec 2008 17:21:30 +0000 (17:21 +0000)]
[docs] Fix a typo in the binding pool section
Emmanuele Bassi [Fri, 19 Dec 2008 16:44:40 +0000 (16:44 +0000)]
Merge branch 'cairo-texture'
* cairo-texture:
[cairo-texture] Remove the construct only restriction on surface size
[cairo-texture] Silently discard 0x0 surfaces
Re-indent ClutterPath header
Add a test case for the new cairo path functions
Add clutter_path_to_cairo_path and clutter_path_add_cairo_path
Warn instead of returning in the IN_PAINT check
Small documentation fixes
Print a warning when creating a cairo_t while painting
Do not set the IN_PAINT flag inside the Stage paint
Set the IN_PAINT private flag
[docs] Add ClutterCairoTexture to the API reference
Add ClutterCairoTexture
Require Cairo as a Clutter dependency
Conflicts:
Fix merge conflict in clutter/clutter-path.h
Neil Roberts [Fri, 19 Dec 2008 13:15:26 +0000 (13:15 +0000)]
[cairo-texture] Remove the construct only restriction on surface size
It is possible to change the surface size after construction with
clutter_cairo_texture_set_surface_size so it doesn't seem right to
restrict changing the properties.
clutter_cairo_texture_resize_surface_internal is called in a handler
for the notify signal. It is called there rather than directly in the
set_property handler so that changing both properties in a single
g_object_set will only cause one resize. The constructed override is
no longer needed.
resize_surface_internal will now bail out if the size of the surface
is already the right size.
Emmanuele Bassi [Fri, 19 Dec 2008 13:42:17 +0000 (13:42 +0000)]
[texture] Do not mix fixed point and units values
Like we did for ClutterActor in commit
cdb78ec4, fix ClutterTexture
usage of CoglFixed and ClutterUnit values without conversion between
the two types.
Emmanuele Bassi [Fri, 19 Dec 2008 13:03:53 +0000 (13:03 +0000)]
[tests] Fix the actor detection
The test-unproject interactive test assumed that only the rectangle was
on the stage. As it turns out, labels can be picked as well.
Emmanuele Bassi [Fri, 19 Dec 2008 12:53:57 +0000 (12:53 +0000)]
[units] Do not use fixed point and units interchangeably
Clutter units are, at the moment, implemented as a value in fixed point
notation using the same format as CoglFixed. This is, though, an
implementation detail. For this reason, units should not be treated as
CoglFixed values and should be converted to and from fixed point using
the provided macros.
This commit updates the usage of units and fixed point values in
ClutterActor and rationalises some of the transformation code that
heavily relied on the equivalency between them.
Emmanuele Bassi [Thu, 18 Dec 2008 18:14:22 +0000 (18:14 +0000)]
[docs] Fix a copy-and-paste typo in the coding style
Emmanuele Bassi [Thu, 18 Dec 2008 17:56:11 +0000 (17:56 +0000)]
[docs] Add coding style document
We should formalise the current coding style of Clutter for
third parties that wish to start hacking and contribute back
patches.
Robert Bragg [Thu, 18 Dec 2008 17:54:35 +0000 (17:54 +0000)]
Improves tfp performance on Nvidia
Some drivers (e.g. Nvidia) get upset if you try to create multiple glx pixmaps
for the same server side pixmap object, even though you might have unique
client side names, we now avoid hitting this problem by destroying the current
glx pixmap early within clutter_glx_texture_pixmap_create_glx_pixmap.
Neil Roberts [Thu, 18 Dec 2008 17:40:36 +0000 (17:40 +0000)]
[test-scale] Add a label showing the gravity
A label is now displayed under the rectangle showing the current
gravity. The text for the gravity is taken from the GEnumClass. This
makes it easier to verify that the test is working correctly.
Neil Roberts [Thu, 18 Dec 2008 12:20:46 +0000 (12:20 +0000)]
Fix calculation in clutter_cubic_bezier
The calculation for cubic bezier curves had an extra multiplication by
3 which was causing the curve to go over 1.0 very quickly. This had
the affect of making test-animation appear to complete much before the
completed signal is emitted.
Neil Roberts [Wed, 17 Dec 2008 19:26:24 +0000 (19:26 +0000)]
[clutter-interval] Fix calculation of interval for unsigned types
The patch makes it cast to double before subtracting the original
value from the target value. Otherwise if the target value is less
than the original value then the subtraction will overflow and the
factor will be multiplied by a very large number instead of the
desired interval.
The problem is demonstrable using the border-width property of
ClutterRectangle.
Emmanuele Bassi [Wed, 17 Dec 2008 15:40:33 +0000 (15:40 +0000)]
[cairo-texture] Silently discard 0x0 surfaces
The current CairoTexture can be created with a surface size of 0
by 0 pixels, but a warning will be printed.
Worse, the surface can be resized to be 0 by 0 pixels without a
warning. The :surface-width and :surface-height properties accept
a minimum value of 0, and not check is performed on either the
constructor or set_surface_size() parameters to enforce the "greater
than zero" rule.
The correct and consistent behaviour is to allow a 0 by 0 pixels
surface size everywhere; inside surface_resize_internal(), the
current surface will be destroyed and if either :surface-width or
:surface-height are set to 0, the resizing terminates.
Attempting to create a Cairo context from a CairoTexture with
either :surface-width or :surface-height set to 0 will result in
a warning.
This allows:
- creating a CairoTexture with :surface-width or :surface-height
set to zero and delaying the surface resize at a later point;
- resizing the surface to 0 by 0 pixels to destroy the image
surface used internally;
- increase the consistency in the usage of CairoTexture.
Neil Roberts [Wed, 17 Dec 2008 14:47:23 +0000 (14:47 +0000)]
Minor fix to documentation for clutter_actor_get_anchor_point
In both versions of clutter_actor_get_anchor_point the description of
the @anchor_y parameter was slightly wrong in different ways.
Emmanuele Bassi [Wed, 17 Dec 2008 13:59:56 +0000 (13:59 +0000)]
[tests] Create a real file for each test unit
Currently, the conformance test suite creates symbolic links pointing
to a wrapper script that just parses the name used to invoke it and
calls the gtester with the correct path.
Unfortunately, this presents two issues:
- it does not really work on file systems that do not
support symbolic links
- it leaves behind the symbolic links, which cannot
be automatically cleaning by 'make clean'
Both can be solved by creating a small script that invokes the wrapper
one with the test unit path.
The Makefile will use test-conform to extract the unit test paths
and generate a list that will be iterated over to create the
executable name (using the "test-name" convention also used by the
interactive tests, instead of "test_name"); the executable is then
just a simple shell script that invokes the wrapper script passing
the unit test path on the command line. The wrapper script will
use the first argument to work correctly, so it could be simply
executed like:
./test-wrapper.sh /path/to/unit_test
Which is another improvement over the current implementation, where
the wrapper script does not work when invoked directly.
Neil Roberts [Tue, 16 Dec 2008 15:39:53 +0000 (15:39 +0000)]
Convert clutter_path_get_position to take a gdouble instead of an alpha value
The gdouble value represents an interval along the path from 0.0 to
1.0. This makes more sense than using an alpha value because paths are
not directly related to ClutterAlphas and the rest of the Clutter API
tends to expose gdouble arguments.
Neil Roberts [Mon, 15 Dec 2008 16:32:21 +0000 (16:32 +0000)]
[test-paint-wrapper] Use a separate paint guard for each actor
Since commit
c7c5cf9b ClutterCloneTexture causes an extra paint of the
source actor during the paint run of the cloned texture if the source
is not yet visible. When the stage is first shown it is redrawn
immediatly before it is mapped which means get_paint_visibility will
fail on the source actor so the inner paint will be run. The paint
guards were a global variable so they didn't cope with a second actor
being painted.
The breakage didn't occur until commit
d510a4b0 because
get_paint_visibility was also broken.
Emmanuele Bassi [Mon, 15 Dec 2008 15:00:37 +0000 (15:00 +0000)]
Re-indent ClutterPath header
Match the indentation and style of the other Clutter headers.
Emmanuele Bassi [Mon, 15 Dec 2008 14:29:59 +0000 (14:29 +0000)]
Fix a typo in the ClutterParamSpecFixed declaration
The ClutterParamSpecFixed constructor is declared in the header
as taking ClutterFixed values, but the implementation takes
ClutterUnit values instead. This obviously works because fixed
and units are exactly the same type.
This commit fixes the wrong parameters.
Emmanuele Bassi [Sat, 13 Dec 2008 11:53:03 +0000 (11:53 +0000)]
Remove a double semi-colon typo
Fixes bug 1351 - Extra ; in clutter-behaviour-ellipse.c
Thanks to Haakon Sporsheim.
Neil Roberts [Fri, 12 Dec 2008 22:47:46 +0000 (22:47 +0000)]
Fix the gtk-doc for some properties in ClutterActor
Some of the properties were specified as ClutterActor::property (with
two colons) but gtk-doc expects one colon so the documentation is not
parsed.
Neil Roberts [Fri, 12 Dec 2008 17:38:53 +0000 (17:38 +0000)]
Fix the definition of clutter_actor_set_scale to match the declaration
Trivial change to declare the parameter as gdouble instead of double
so that it matches the header.
Neil Roberts [Fri, 5 Dec 2008 18:37:46 +0000 (18:37 +0000)]
Add a test case for the new cairo path functions
The nodes of the test path have been reordered because Cairo coalesces
multiple move operations into a single move so the comparison would
fail if the two move nodes are consecutive.
Neil Roberts [Fri, 5 Dec 2008 18:37:31 +0000 (18:37 +0000)]
Add clutter_path_to_cairo_path and clutter_path_add_cairo_path
See bug #1325.
Added doc for new cairo path functions to clutter-sections.txt
Emmanuele Bassi [Fri, 12 Dec 2008 11:42:16 +0000 (11:42 +0000)]
Warn instead of returning in the IN_PAINT check
It's conceivable that a warning should be deemed enough, instead
of just returning a NULL cairo_t when creating a context for the
CairoTexture actor.
Emmanuele Bassi [Thu, 11 Dec 2008 15:51:24 +0000 (15:51 +0000)]
Small documentation fixes
Fix the CairoTexture description, and some of the comments inside
the code, especially with regards to the alpha channel unpremultiplication
that we have to perform each time we upload the image surface to
GL.
Emmanuele Bassi [Thu, 11 Dec 2008 15:48:43 +0000 (15:48 +0000)]
Print a warning when creating a cairo_t while painting
If you create a Cairo context in the middle of a paint run and then
you destroy it, the CairoTexture will have to upload the contents of
the image surface to the GL pipeline. This usually leads to slow
downs and general performance degradation.
ClutterCairoTexture will warn to the console if Clutter has been
compiled with the debug messages and if create() or create_region()
are called while an actor is in the middle of a paint.
Emmanuele Bassi [Thu, 11 Dec 2008 15:41:25 +0000 (15:41 +0000)]
Do not set the IN_PAINT flag inside the Stage paint
Since the CLUTTER_ACTOR_IN_PAINT private flag is set as part
of the paint process by clutter_actor_paint(), there is no
need to set it inside the ClutterStage paint function.
Emmanuele Bassi [Thu, 11 Dec 2008 15:39:28 +0000 (15:39 +0000)]
Set the IN_PAINT private flag
When calling clutter_actor_paint() we should be setting the
CLUTTER_ACTOR_IN_PAINT private flag. This allows signalling
to each Actor subclass that we are effectively in the middle
of a paint sequence. Actor subclasses can check for this
private flag and act based on its presence - for instance to
avoid recursion, or to detect performance degradation cases.
Emmanuele Bassi [Thu, 11 Dec 2008 15:37:21 +0000 (15:37 +0000)]
[docs] Add ClutterCairoTexture to the API reference
Emmanuele Bassi [Thu, 11 Dec 2008 15:24:07 +0000 (15:24 +0000)]
Add ClutterCairoTexture
Move the ClutterCairo actor from a separate library to an in-tree
actor.
ClutterCairoTexture is a simple texture subclass that allows you
to retrieve a Cairo context for a private image surface. When the
Cairo context is destroyed it will cause the image surface
contents to be uploaded to a GL texture.
The image surface used is not hardware accelerated.
Emmanuele Bassi [Thu, 11 Dec 2008 15:22:42 +0000 (15:22 +0000)]
Require Cairo as a Clutter dependency
Cairo has been an indirect dependency for Clutter since 0.8, through
the PangoCairo API.
Now we explicitly depend on Cairo in order to merge the clutter-cairo
API into Clutter core.
Emmanuele Bassi [Thu, 11 Dec 2008 11:11:11 +0000 (11:11 +0000)]
Resort the main Clutter include file
Just for overall sanity we keep the include file sorted.
Emmanuele Bassi [Wed, 10 Dec 2008 23:12:22 +0000 (23:12 +0000)]
Update ignore file
Emmanuele Bassi [Wed, 10 Dec 2008 23:00:48 +0000 (23:00 +0000)]
Do not modify parameters in place
When the apply_transform_to_point() and its relative variant
landed in Clutter 0.3, the initial approach was to modify the
passed vertex as an in-out parameter. This was later dropped
in favour of a more consistent out parameter.
Unfortunately, the implementation never changed: both methods
where modifying the passed vertex with the partial results of
the computations.
This commit copies the contents of the "point" ClutterVertex
argument inside a stack variable and, for good measure, constifies
the argument.
Thanks to Thomas Steinacher for catching this in Python.
Neil Roberts [Wed, 10 Dec 2008 12:13:20 +0000 (12:13 +0000)]
* clutter/cogl/gl/cogl.c:
* clutter/cogl/gl/cogl-defines.h.in:
* clutter/cogl/gl/cogl-context.h:
* clutter/cogl/common/cogl-mesh.c: Rename the glBufferDataSub
function to glBufferSubData. When calling glXGetProcAddress with
the former Mesa returns a stub dispatch function which will
segfault if you try to use it. With NVIDIA it returns NULL so
_cogl_features_init decides the card doesn't have VBO support.
Neil Roberts [Wed, 10 Dec 2008 11:27:14 +0000 (11:27 +0000)]
Bug 1323 - ClutterBehaviorDepth conflicts with other behaviors
* clutter/clutter-behaviour-ellipse.c (actor_apply_knot_foreach):
Don't set the depth if there is no x or y tilt. That way it can
still be used in conjunction with ClutterBehaviourDepth. Thanks to
Tonny Tzeng.
Emmanuele Bassi [Mon, 8 Dec 2008 14:22:52 +0000 (14:22 +0000)]
2008-12-08 Emmanuele Bassi <ebassi@linux.intel.com>
* clutter/clutter-binding-pool.h: Fix the ActivateFunc
documentation by adding a "return value" annotation.
Emmanuele Bassi [Mon, 8 Dec 2008 14:22:39 +0000 (14:22 +0000)]
2008-12-08 Emmanuele Bassi <ebassi@linux.intel.com>
* clutter/clutter-docs.xml:
* clutter/clutter-sections.txt: Add ClutterBindingPool
section and link.
Emmanuele Bassi [Mon, 8 Dec 2008 13:57:10 +0000 (13:57 +0000)]
2008-12-08 Emmanuele Bassi <ebassi@linux.intel.com>
* clutter/Makefile.am:
* clutter/clutter.h: Add ClutterBindingPool to the build.
* clutter/clutter-binding-pool.c:
* clutter/clutter-binding-pool.h: Add ClutterBindingPool, a data
structure meant to hold (key symbol, modifiers) pairs and associate
them to a closure. The ClutterBindingPool can be used to install
key bindings for actors and then execute closures inside the
key-press-event signal handlers, removing the need for big
switch() or if() blocks for each key.
* clutter/clutter-event.c: Consistently use "key symbol" instead
of "key value".
* clutter/clutter-event.h: Add more modifier masks.
* clutter/clutter-marshal.list:
* tests/conform/Makefile.am:
* tests/conform/test-binding-pool.c:
* tests/conform/test-conform-main.c: Add ClutterBindingPool
conformance test.
* tests/interactive/Makefile.am:
* tests/interactive/test-binding-pool.c: Add interactive test (and
example code) for the ClutterBindingPool usage.
Neil Roberts [Mon, 8 Dec 2008 12:02:36 +0000 (12:02 +0000)]
* clutter/clutter-main.c (_clutter_do_pick): Restore the GL_DITHER
state after reading the pixel value instead of before. Suggested
in bug 1328 thanks to Guy Zadickario.
Emmanuele Bassi [Fri, 5 Dec 2008 17:44:12 +0000 (17:44 +0000)]
2008-12-05 Emmanuele Bassi <ebassi@linux.intel.com>
Bug 1309 - clutter_timeline_new and clutter_timeline_set_speed
have two standard of the fps limitation
* clutter/clutter-timeline.c:
(clutter_timeline_class_init): Set the maximum value of the
:fps property to be G_MAXUINT. (Zhang Wei)
Neil Roberts [Fri, 5 Dec 2008 14:29:57 +0000 (14:29 +0000)]
* clutter/clutter-entry.c: Fix the 'Since' annotation in the
gtk-doc.
Neil Roberts [Fri, 5 Dec 2008 14:08:06 +0000 (14:08 +0000)]
* clutter/clutter-timeline.c:
* clutter/clutter-texture.c:
* clutter/clutter-stage.c:
* clutter/clutter-label.c:
* clutter/clutter-behaviour-path.c:
* clutter/clutter-actor.c: Fix the 'Since' annotation in the
gtk-doc.
Neil Roberts [Fri, 5 Dec 2008 13:13:37 +0000 (13:13 +0000)]
Bug 1252 - Merge ClutterBehaviourPath and ClutterBehaviourBspline
* clutter/clutter-path.h:
* clutter/clutter-path.c: Implementation of new ClutterPath object
to represent a path combining straight line and bezier curve
elements.
* clutter/clutter.h: Include clutter-path.h and remove
clutter-behaviour-bspline.h
* tests/interactive/test-threads.c (test_threads_main):
* tests/interactive/test-script.c:
* tests/interactive/test-behave.c (test_behave_main): Use new path
API
* clutter/clutter-effect.c: Use the new ClutterBehaviourPath API.
* clutter/clutter-bezier.h:
* clutter/clutter-bezier.c: Moved bezier curve handling code out
from clutter-behaviour-bspline.c to a separate file.
* clutter/clutter-behaviour-path.h:
* clutter/clutter-behaviour-path.c: Reimplemented to work with a
ClutterPath
* clutter/clutter-behaviour-bspline.h:
* clutter/clutter-behaviour-bspline.c: Removed
* clutter/Makefile.am: Add clutter-path and clutter-bezier, remove
clutter-behaviour-bspline.
* tests/conform/test-path.c: New automatic test for ClutterPath
consistency
* tests/conform/test-conform-main.c (main): Add test_path
* tests/conform/Makefile.am (test_conformance_SOURCES): Add
test-path.c
* clutter/clutter-sections.txt: Add ClutterPath docs
* clutter/clutter.types:
* clutter/clutter-docs.xml:
* doc/reference/clutter/clutter-animation-tutorial.xml: Remove
mention of ClutterBehaviourBspline
* clutter/clutter-marshal.list: Add VOID:UINT
Neil Roberts [Thu, 4 Dec 2008 17:24:33 +0000 (17:24 +0000)]
Bug 1297 - Bring back support for GL_ARB_texture_rectangle
* clutter/cogl/gl/cogl-texture.c (cogl_texture_new_from_foreign,
(_cogl_texture_quad_hw, cogl_texture_polygon),
(_cogl_texture_quad_sw): Support GL_ARB_texture_rectangle textures
* clutter/glx/clutter-glx-texture-pixmap.c: Use rectangle textures
when NPOTs are not available or it is forced by the
CLUTTER_PIXMAP_TEXTURE_RECTANGLE environment variable.
* clutter/cogl/gl/cogl.c (cogl_enable): Allow enabling
GL_TEXTURE_RECTANGLE_ARB.
Neil Roberts [Thu, 4 Dec 2008 13:45:09 +0000 (13:45 +0000)]
Bug 1172 - Disjoint paths and clip to path
* clutter/cogl/cogl-path.h:
* clutter/cogl/common/cogl-primitives.c:
* clutter/cogl/common/cogl-primitives.h:
* clutter/cogl/gl/cogl-primitives.c:
* clutter/cogl/gles/cogl-primitives.c: Changed the semantics of
cogl_path_move_to. Previously this always started a new path but
now it instead starts a new disjoint sub path. The path isn't
cleared until you call either cogl_path_stroke, cogl_path_fill or
cogl_path_new. There are also cogl_path_stroke_preserve and
cogl_path_fill_preserve functions.
* clutter/cogl/gl/cogl-context.c:
* clutter/cogl/gl/cogl-context.h:
* clutter/cogl/gles/cogl-context.c:
* clutter/cogl/gles/cogl-context.h: Convert the path nodes array
to a GArray.
* clutter/cogl/gl/cogl-texture.c:
* clutter/cogl/gles/cogl-texture.c: Call cogl_clip_ensure
* clutter/cogl/common/cogl-clip-stack.c:
* clutter/cogl/common/cogl-clip-stack.h: Simplified the clip
stack code quite a bit to make it more maintainable. Previously
whenever you added a new clip it would go through a separate route
to immediately intersect with the current clip and when you
removed it again it would immediately rebuild the entire clip. Now
when you add or remove a clip it doesn't do anything immediately
but just sets a dirty flag instead.
* clutter/cogl/gl/cogl.c:
* clutter/cogl/gles/cogl.c: Taken away the code to intersect
stencil clips when there is exactly one stencil bit. It won't work
with path clips and I don't know of any platform that doesn't have
eight or zero stencil bits. It needs at least three bits to
intersect a path with an existing clip. cogl_features_init now
just decides you don't have a stencil buffer at all if you have
less than three bits.
* clutter/cogl/cogl.h.in: New functions and documentation.
* tests/interactive/test-clip.c: Replaced with a different test
that lets you add and remove clips. The three different mouse
buttons add clips in different shapes. This makes it easier to
test multiple levels of clipping.
* tests/interactive/test-cogl-primitives.c: Use
cogl_path_stroke_preserve when using the same path again.
* doc/reference/cogl/cogl-sections.txt: Document the new
functions.
Robert Bragg [Wed, 3 Dec 2008 18:00:05 +0000 (18:00 +0000)]
Bug 1303 - clutter_glx_texture_pixmap_using_extension doesn't check if
fallbacks are being used
* glx/clutter-glx-texture-pixmap.c:
clutter_glx_texture_pixmap_using_extension now checks to see if
priv->use_fallback is TRUE not just that the tfp extension is
available.
Neil Roberts [Mon, 1 Dec 2008 16:27:54 +0000 (16:27 +0000)]
Bug 1305 - NPOT textures unaligned to a pixel sometimes have
border artifacts
* clutter/cogl/gl/cogl-texture.c: Set the wrap mode of a texture
on demand
Instead of setting the wrap mode once per texture at creation, it
is now changed whenever the texture is drawn. The previous value
is cached so that it isn't changed if the value is the same.
This is used in _cogl_texture_quad_hw to only enable GL_REPEAT
mode when the coordinates are not in the range [0,1]. Otherwise it
can pull in pixels from the other edge when the texture is
rendered off-pixel.
Neil Roberts [Fri, 28 Nov 2008 17:45:54 +0000 (17:45 +0000)]
* tests/conform/test-backface-culling.c (TEXTURE_SIZE): Don't set
to a funny size on GLES because it will break cogl_texture_polygon
Neil Roberts [Fri, 28 Nov 2008 17:36:37 +0000 (17:36 +0000)]
* tests/conform/test-backface-culling.c: New test for backface
culling
* tests/conform/test-conform-main.c (main): Add
/texture/test_backface_culing
* tests/conform/Makefile.am (test_conformance_SOURCES): Add
test-backface-culling.c
Neil Roberts [Fri, 28 Nov 2008 16:25:20 +0000 (16:25 +0000)]
* tests/conform/test-mesh-mutability.c:
* tests/conform/test-mesh-interleved.c:
* tests/conform/test-mesh-contiguous.c: Remove the idle source
after the test is complete so that it won't interfere with other
tests.
Emmanuele Bassi [Wed, 26 Nov 2008 16:46:48 +0000 (16:46 +0000)]
2008-11-26 Emmanuele Bassi <ebassi@linux.intel.com>
* clutter/clutter-group.c:
(clutter_group_real_raise), (clutter_group_real_lower): Repaint
the Group on raise and lower.
Neil Roberts [Wed, 26 Nov 2008 16:35:25 +0000 (16:35 +0000)]
* clutter/cogl/gl/cogl-texture.c (cogl_texture_rectangle): Fixed
the test for whether to use hardware tiling. Previously it assumed
that texture coordinates are in increasing order but this is not
the case since bug 1057 was fixed. The texture coordinates are now
sorted later. It also allowed negative coordinates which doesn't
make sense if the texture has waste.
Emmanuele Bassi [Tue, 25 Nov 2008 16:45:47 +0000 (16:45 +0000)]
2008-11-25 Emmanuele Bassi <ebassi@linux.intel.com>
* configure.ac: Remove stray dependency on gdk-pixbuf-xlib; we
don't use the xlib specific API anymore. (thanks to Matthias
Clasen)
Neil Roberts [Tue, 25 Nov 2008 13:19:48 +0000 (13:19 +0000)]
Bug 1299 - clutter_score_remove will segmentation fault if
timelines are more than 52 and continue to remove them
* clutter/clutter-score.c (traverse_children): Don't destroy the
entry in the handler for REMOVE_BY_ID. It will be removed again
anyway in the call to g_node_traverse. This was causing a
crash. Thanks to zhangwei for spotting.
Neil Roberts [Mon, 24 Nov 2008 15:44:16 +0000 (15:44 +0000)]
Add a wrapper library to help testing without NPOTs.
* tests/tools/Makefile.am: Optionally build the
libdisable-npots.la library depending on whether libdl was
detected in the configure script. A helper script is also
generated to setup the LD_PRELOAD.
* tests/conform/Makefile.am: There are now two versions of the
test-report and full-report rules. test-report-normal is the same
as before and test-report-disable-npots runs the tests with the
disable-npots wrapper script. The full-report rule runs both of
them and displays two separate HTML files. The test-report rule
just runs the normal version as before.
* configure.ac: Add a test for libdl
* tests/tools/disable-npots.sh.in: New file. Template for the
helper script
* tests/tools/disable-npots.c: New file
Neil Roberts [Mon, 24 Nov 2008 12:27:48 +0000 (12:27 +0000)]
* clutter/cogl/gl/cogl-texture.c (cogl_texture_polygon): Fix the
equation for calculating texture coordinates when using sliced
textures. This became broken in revision 3520.
Neil Roberts [Fri, 21 Nov 2008 16:38:34 +0000 (16:38 +0000)]
Bug 1270 - Update to mingw-cross-compile.sh
* build/mingw/mingw-cross-compile.sh: Update to download latest
binaries. Patch thanks to David Kedves.
Neil Roberts [Fri, 21 Nov 2008 16:18:58 +0000 (16:18 +0000)]
Bug 1271 - mingw compiling failed: undefined reference to
`_glDrawRangeElements@24'
Resolve glDrawRangeElements with cogl_get_proc_address instead of
calling it directly because functions defined in GL > 1.1 are not
directly exported under Windows.
* clutter/cogl/common/cogl-mesh.c: Use the function pointer from
the context
* clutter/cogl/gl/cogl-context.c (cogl_create_context): Initialise
function pointer.
* clutter/cogl/gl/cogl-context.h (CoglContext): Add a function
pointer
* clutter/cogl/gl/cogl-defines.h.in: Add a typedef for the
function pointer.
* clutter/cogl/gl/cogl.c (_cogl_features_init): Resolve
glDrawRangeElements
Neil Roberts [Fri, 21 Nov 2008 16:18:47 +0000 (16:18 +0000)]
* tests/interactive/Makefile.am:
* tests/conform/Makefile.am: Use $(EXEEXT) when specifying a
dependency on an executable otherwise there won't be a rule to
build it on Windows.
Neil Roberts [Fri, 21 Nov 2008 16:18:38 +0000 (16:18 +0000)]
Bug 1269 - mingw32 building failed at clutter-media.c
* clutter/clutter-media.c: Rename the 'ERROR' signal enum to
'ERROR_SIGNAL' otherwise it clashes with windgi.h. Thanks to David
Kedves
Neil Roberts [Fri, 21 Nov 2008 16:18:31 +0000 (16:18 +0000)]
* clutter/pango/cogl-pango.h: Include pango/pango.h to get
pango-renderer.h. In versions prior to 1.18.4 pangocairo.h does
not include pango-renderer.h
Neil Roberts [Fri, 21 Nov 2008 12:01:41 +0000 (12:01 +0000)]
Bug 1280 - clutter_score_append_at_marker lead to segmentation
fault in trunk and incorrect appearance in clutter-0.8
* clutter/clutter-score.c (start_children_entries): Check whether
the child timeline is actually attached at a marker before
comparing whether the marker's name matches the marker
reached. This fixes a crash that happens when a marker is reached
on a timeline that also has child timelines attached at the
end. Thanks to zhangwei for spotting.
Emmanuele Bassi [Thu, 20 Nov 2008 10:52:09 +0000 (10:52 +0000)]
2008-11-20 Emmanuele Bassi <ebassi@linux.intel.com>
* clutter/clutter-actor.c:
(clutter_actor_set_property): Add sanity checks for NULL
boxed values when setting the rotation center.
* tests/interactive/test-animation.c:
(on_button_press): Add an example on how to use the rotation
properties to animate an actor.
Neil Roberts [Tue, 18 Nov 2008 18:53:10 +0000 (18:53 +0000)]
Fixed some trivial compiler warnings
* tests/interactive/test-pixmap.c (create_pixmap): Use a format
string instead of passing the error message directly to g_error.
* tests/interactive/test-easing.c (test_easing_main)
(on_button_press):
* tests/interactive/test-animation.c (on_button_press): Use
unsigned variables for the results from clutter_actor_get_size
otherwise it complains about the pointer signedness being
different.
* clutter/clutter-script.c (clutter_script_add_search_paths): Use
G_GSIZE_FORMAT instead of %d for a gsize parameter otherwise it
gets upset on 64-bit.
Neil Roberts [Tue, 18 Nov 2008 18:30:55 +0000 (18:30 +0000)]
* tests/conform/test-timeline.c (test_timeline): Remove the delay
idle handler after the test is finished, otherwise it will
continue running during subsequent tests. This was breaking
test_timeline_interpolate.
Robert Bragg [Tue, 18 Nov 2008 16:24:31 +0000 (16:24 +0000)]
* clutter/cogl/common/cogl-mesh.c:
Re-works validate_custom_attribute_name() so it doesn't access an
un-initialised variable.
Robert Bragg [Tue, 18 Nov 2008 16:24:09 +0000 (16:24 +0000)]
A comparison of gl/cogl-texture.c and gles/cogl-texture.c, to reduce
differences and improve maintainability.
* clutter/cogl/gl/cogl-context.h:
Adds a CoglTextureGLVertex typedef + texture_vertices and
texture_vertices_size members to CoglContext for using vertex arrays
like GLES does
* clutter/cogl/gl/cogl-context.c:
Initializes texture_vertices + texture_vertices_size members
* clutter/cogl/gl/cogl-internal.h:
Adds COGL_ENABLE_COLOR_ARRAY
* clutter/cogl/gl/cogl.c:
Add COGL_ENABLE_COLOR_ARRAY support to cogl_enable
* clutter/cogl/gles/cogl-context.h:
Change the CoglTextureGLVertex to use GLfloat for the position
and texture coord attributes and GLubyte for the color.
* clutter/cogl/gles/cogl-texture-private.h:
Adds a wrap_mode member like GL has.
* clutter/cogl/gl/cogl-texture.c
* clutter/cogl/gles/cogl-texture.c:
Improves the comparability of the files, such that the remaining
differences, better reflect the fundamental differences needed
between GL and GLES. Notably GL no longer uses glBegin/glEnd for
submitting vertices, it uses vertex arrays like GLES and this gives
a small but measurable fps improvement for test-text.
Robert Bragg [Tue, 18 Nov 2008 16:23:40 +0000 (16:23 +0000)]
* clutter/cogl/gl/cogl-internal.h
* clutter/cogl/gles/cogl-internal.h:
Removes semicolon after the GE() macro since that breaks using it as a
single statement.
Emmanuele Bassi [Tue, 18 Nov 2008 15:35:20 +0000 (15:35 +0000)]
2008-11-18 Emmanuele Bassi <ebassi@linux.intel.com>
* clutter/clutter.h: Add clutter-shader.h and
clutter-shader-types.h to the global include.