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 [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.
Emmanuele Bassi [Tue, 18 Nov 2008 15:21:02 +0000 (15:21 +0000)]
2008-11-18 Emmanuele Bassi <ebassi@linux.intel.com>
* clutter/cogl/cogl-shader.h: Add a function for setting an
integer uniform, similar to cogl_program_uniform_1f().
* clutter/cogl/gl/cogl-program.c: Implement the GL version
of cogl_program_uniform_1i().
* clutter/cogl/gles/cogl-program.c: Implement the GLES version
of cogl_program_uniform_1i().
Emmanuele Bassi [Tue, 18 Nov 2008 15:08:40 +0000 (15:08 +0000)]
2008-11-18 Emmanuele Bassi <ebassi@linux.intel.com>
Bug 1049 - Clutter doesn't support most GLSL uniforms (patch
by Chris Lord and Neil Roberts)
* README: Update release notes.
* clutter/Makefile.am:
* clutter/clutter-shader-types.[ch]: Add GValue types for
shader values.
* clutter/clutter-actor.[ch]: Update the shader API to use
the newly added GValue support for GLSL shader uniform
setters.
* clutter/clutter-shader.[ch]: Add float and integer convenience
API for single value GLSL uniform setters.
* clutter/cogl/cogl-shader.h: Add new uniform setters.
* clutter/cogl/gl/cogl-context.c:
* clutter/cogl/gl/cogl-context.h:
* clutter/cogl/gl/cogl-defines.h.in:
* clutter/cogl/gl/cogl-program.c:
* clutter/cogl/gl/cogl.c: Update the GL implementation of COGL
to handle the GLSL uniform setters.
* clutter/cogl/gles/cogl-gles2-wrapper.c:
* clutter/cogl/gles/cogl-gles2-wrapper.h:
* clutter/cogl/gles/cogl-internal.h:
* clutter/cogl/gles/cogl-program.c: Update the GLES 2.0 implementation
of COGL to handle the GLSL uniform setters.
* doc/reference/clutter/clutter-sections.txt:
* doc/reference/cogl/cogl-sections.txt: Update the documentation.
* tests/interactive/test-fbo.c:
* tests/interactive/test-shader.c: Update the shader tests.
Emmanuele Bassi [Tue, 18 Nov 2008 13:52:22 +0000 (13:52 +0000)]
2008-11-18 Emmanuele Bassi <ebassi@linux.intel.com>
* clutter/clutter-texture.c:
(clutter_texture_get_preferred_width): Fix the usage of the
fixed point division macro.
Emmanuele Bassi [Tue, 18 Nov 2008 13:06:02 +0000 (13:06 +0000)]
2008-11-18 Emmanuele Bassi <ebassi@linux.intel.com>
* tests/conform/test-conform-main.c (main): Do not run the
conformance test suite if we are on X11 but we do not have
a DISPLAY available. Some of the tests require a DISPLAY,
and everything passes through a clutter_init() call which will
fail anyway. If we are running make distcheck on an headless
box we might as well just skip the conformance test suite
without a meaningless error.
Emmanuele Bassi [Tue, 18 Nov 2008 12:54:34 +0000 (12:54 +0000)]
2008-11-18 Emmanuele Bassi <ebassi@linux.intel.com>
* tests/conform/test-mesh-contiguous.c:
* tests/conform/test-mesh-interleved.c:
* tests/conform/test-mesh-mutability.c: Remove the last bare
g_print() from the conformance test suite.
Emmanuele Bassi [Tue, 18 Nov 2008 12:42:05 +0000 (12:42 +0000)]
2008-11-18 Emmanuele Bassi <ebassi@linux.intel.com>
* clutter/clutter-alpha.h:
* clutter/clutter-alpha.c:
(clutter_alpha_set_mode): Use a lookup table to find the alpha
function given the animation mode.
(clutter_exp_in_func),
(clutter_exp_out_func),
(clutter_exp_in_out_func): Add new exponential functions.
* clutter/clutter-script.c: Update the lookup table with the
new animation modes; match "linear" to the ramp-inc alpha
function.
* clutter/clutter-types.h: Add new AnimationMode values.
* tests/interactive/test-easing.c: Update the easing functions
test.
Neil Roberts [Tue, 18 Nov 2008 12:36:27 +0000 (12:36 +0000)]
* tests/conform/test-pick.c (test_pick): The final result message
when --verbose is used was the wrong way around
Neil Roberts [Tue, 18 Nov 2008 12:16:00 +0000 (12:16 +0000)]
* tests/conform/test-conform-main.c (main): Fixed a typo in the
name of the path for test_realized.
Emmanuele Bassi [Tue, 18 Nov 2008 09:50:03 +0000 (09:50 +0000)]
2008-11-17 Emmanuele Bassi <ebassi@linux.intel.com>
Bug 1014 - Clutter Animation API Improvements
* clutter/Makefile.am:
* clutter/clutter.h: Update the build
* clutter/clutter-types.h: Add AnimationMode, an enumeration
for easing functions.
* clutter/clutter-alpha.[ch]: Add the :mode property to
control the function bound to an Alpha instance using an
enumeration value. Also add six new alpha functions:
- ease-in, ease-out, ease-in-out
- sine-in, sine-out, sine-in-out
* clutter/clutter-deprecated.h: Deprecate the #defines for
the alpha functions. They will be replaced by entries in the
ClutterAnimationMode.
* clutter/clutter-interval.[ch]: Add ClutterInterval, an
object for defining, validating and computing an interval
between two values.
* clutter/clutter-animation.[ch]: Add ClutterAnimation, an
object responsible for animation the properties of a single
actor along an interval of values. ClutterAnimation memory
management is automatic. A simple wrapper method for
ClutterActor is provided:
clutter_actor_animate()
which will create, or update, an animation for the passed
actor.
* clutter/clutter-debug.h:
* clutter/clutter-main.c: Add a new 'animation' debug note.
* clutter/clutter-script.c: Clean up the alpha functions
whitelist, and add the new functions.
* doc/reference/clutter/Makefile.am:
* doc/reference/clutter/clutter-sections.txt: Update the
API reference.
* doc/reference/clutter/clutter-animation.xml: Renamed to
doc/reference/clutter/clutter-animation-tutorial.xml to
avoid clashes with the ClutterAnimation section.
* doc/reference/clutter/clutter-docs.sgml: Renamed to
doc/reference/clutter/clutter-docs.xml, as it was an XML
file and not a SGML file.
* tests/Makefile.am:
* tests/interactive/Makefile.am:
* tests/interactive/test-animation.c:
* tests/interactive/test-easing.c: Add two tests for the
new simple animation API and the easing functions.
* tests/interactive/test-actors.c:
* tests/interactive/test-behave.c:
* tests/interactive/test-depth.c:
* tests/interactive/test-effects.c:
* tests/interactive/test-layout.c:
* tests/interactive/test-multistage.c:
* tests/interactive/test-paint-wrapper.c:
* tests/interactive/test-rotate.c:
* tests/interactive/test-scale.c:
* tests/interactive/test-texture-quality.c:
* tests/interactive/test-threads.c:
* tests/interactive/test-viewport.c: Update interactive tests
to the deprecations and new alpha API.
Emmanuele Bassi [Mon, 17 Nov 2008 14:21:49 +0000 (14:21 +0000)]
2008-11-17 Emmanuele Bassi <ebassi@linux.intel.com>
* clutter/clutter-entry.c:
* clutter/clutter-label.c:
* clutter/clutter-rectangle.c:
* clutter/clutter-script.c:
* clutter/clutter-stage.c: Use the ParamSpecColor and GValue
API for ClutterColor-based properties.
Robert Bragg [Sat, 15 Nov 2008 15:03:09 +0000 (15:03 +0000)]
* tests/interactive/Makefile.am
* tests/interactive/test-pixmap.c:
test-pixmap + test-devices accidentally got dropped from the makefiles
when changing the unit test layout; this puts them back.
Emmanuele Bassi [Fri, 14 Nov 2008 14:52:35 +0000 (14:52 +0000)]
2008-11-14 Emmanuele Bassi <ebassi@linux.intel.com>
Bug 1265 - ClutterScore doesn't emit 'started' signal (Bastian
Winkler)
* clutter/clutter-score.c: Emit the ::started signal.
* tests/interactive/test-score.c: Check the emission of the
Score signals.
Neil Roberts [Thu, 13 Nov 2008 14:44:27 +0000 (14:44 +0000)]
* clutter/cogl/gles/cogl-gles2-wrapper.h:
* clutter/cogl/gles/cogl-gles2-wrapper.c:
Initialise the 'tex' sampler uniform to 0. The GLSL spec
specifically says that you must initialize sampler uniforms. This
fixes texturing for GLES 2 when using the PowerVR simulator via
software Mesa.
Robert Bragg [Thu, 13 Nov 2008 14:28:16 +0000 (14:28 +0000)]
Gets the mesh API working with GLES2
* clutter/cogl/common/cogl-mesh.c:
Make sure we use the appropriate cogl_wrap_gl* funcs as appropriate
* clutter/cogl/gles/cogl-gles2-wrapper.c
* clutter/cogl/gles/cogl-gles2-wrapper.h:
In our glColorPointer wrapper we needed to mark our color attribute
as normalized.
* tests/conform/Makefile.am:
When creating unit test symlinks we use the -l gtester option to
list tests, but when using the PVR SDK the test binary also spews
out some extra info that caused lots of random symlinks to be
created. We now grep for lines starting with a '/'
* tests/conform/test-mesh-contiguous.c
* tests/conform/test-mesh-mutability.c:
Use cogl_set_source_color instead of directly calling glColor4ub
Neil Roberts [Thu, 13 Nov 2008 11:37:35 +0000 (11:37 +0000)]
* clutter/clutter-actor.c (clutter_actor_get_paint_visibility):
Fix logic so that it won't return TRUE for a hidden stage.
Emmanuele Bassi [Thu, 13 Nov 2008 10:54:06 +0000 (10:54 +0000)]
2008-11-13 Emmanuele Bassi <ebassi@linux.intel.com>
* clutter/clutter-behaviour-ellipse.c:
(clutter_behaviour_ellipse_applied): Do not reset the depth
of the actors to which the Ellipse behaviour has been applied
to, unless the behaviour is going to update it because it has
a tilt on the X or Y axis.
Neil Roberts [Thu, 13 Nov 2008 10:33:56 +0000 (10:33 +0000)]
* clutter/clutter-actor.c (clutter_actor_get_reactive)
(clutter_actor_get_paint_visibility): Be sure to return exactly
TRUE or FALSE instead of zero or some non-zero value in these
functions that return a gboolean. Thanks to Kai Wei for spotting.
Emmanuele Bassi [Wed, 12 Nov 2008 14:41:01 +0000 (14:41 +0000)]
2008-11-12 Emmanuele Bassi <ebassi@linux.intel.com>
* tests/conform/Makefile.am:
* tests/conform/test-conform-main.c:
* tests/conform/test-paint-opacity.c: Add test unit for label,
rectangle and paint opacity.
Emmanuele Bassi [Wed, 12 Nov 2008 14:16:35 +0000 (14:16 +0000)]
2008-11-12 Emmanuele Bassi <ebassi@linux.intel.com>
* clutter/clutter-sections.txt: Add new symbols.
Emmanuele Bassi [Wed, 12 Nov 2008 13:57:58 +0000 (13:57 +0000)]
2008-11-12 Emmanuele Bassi <ebassi@linux.intel.com>
* clutter/cogl/cogl-color.h:
* clutter/cogl/cogl-path.h:
* clutter/cogl/cogl-types.h:
* clutter/cogl/common/cogl-color.c: Deprecated cogl_color()
in favour of cogl_set_source_color() and friends; store the
CoglColor components as unsigned bytes instead of fixed point
normalized values; add functions for allocating, copying and
freeing CoglColor, for use of language bindings.
* clutter/cogl/cogl.h.in:
* clutter/cogl/cogl-deprecated.h: Added cogl-deprecated.h,
an header file containing the deprecation symbols similar
to clutter-deprecated.h.
* clutter/cogl/gl/Makefile.am:
* clutter/cogl/gl/cogl-texture.c:
* clutter/cogl/gl/cogl.c:
* clutter/cogl/gles/Makefile.am:
* clutter/cogl/gles/cogl-texture.c:
* clutter/cogl/gles/cogl.c: Update the GL and GLES implementations
of COGL after the CoglColor changes.
* clutter/clutter-actor.c:
* clutter/clutter-clone-texture.c:
* clutter/clutter-entry.c:
* clutter/clutter-label.c:
* clutter/clutter-rectangle.c:
* clutter/clutter-texture.c: Do not use CoglColor whenever it
is possible, and use cogl_set_source_color4ub() instead.
* clutter/pango/cogl-pango-render.c: Ditto as above.
* doc/reference/clutter/subclassing-ClutterActor.xml:
* doc/reference/cogl/cogl-sections.txt: Update the documentation.
* tests/interactive/test-cogl-offscreen.c:
* tests/interactive/test-cogl-primitives.c:
* tests/interactive/test-cogl-tex-convert.c:
* tests/interactive/test-cogl-tex-foreign.c:
* tests/interactive/test-cogl-tex-getset.c:
* tests/interactive/test-cogl-tex-polygon.c:
* tests/interactive/test-cogl-tex-tile.c:
* tests/interactive/test-paint-wrapper.c: Drop the usage of
CoglColor whenever it is possible.
Neil Roberts [Wed, 12 Nov 2008 13:03:09 +0000 (13:03 +0000)]
Bug 1057 - cogl_texture_rectangle doesn't support backward
coordinates
* clutter/cogl/gl/cogl-texture.c: Instead of sorting the vertex
and texture coordinates passed to cogl_texture_rectangle, just
swap both sets whenever the texture coordinates are backward.
Neil Roberts [Wed, 12 Nov 2008 12:39:55 +0000 (12:39 +0000)]
* clutter/clutter-rectangle.c (clutter_rectangle_paint): Fixed so
that it doesn't use the alpha value from the border colour to draw
the rectangle
Neil Roberts [Wed, 12 Nov 2008 12:08:44 +0000 (12:08 +0000)]
* clutter/cogl/gles/Makefile.am (libclutterinclude_HEADERS):
* clutter/cogl/gl/Makefile.am (libclutterinclude_HEADERS):
* clutter/cogl/common/Makefile.am
(libclutter_cogl_common_la_SOURCES): Move cogl-mesh.h into the
headers for libclutter so that it will get installed.
Neil Roberts [Wed, 12 Nov 2008 10:55:06 +0000 (10:55 +0000)]
Fix warnings in mesh tests
* tests/conform/test-mesh-mutability.c (on_paint):
* tests/conform/test-mesh-interleved.c (on_paint):
* tests/conform/test-mesh-contiguous.c (on_paint): Use g_usleep
instead of sleep
* tests/conform/test-mesh-mutability.c (queue_redraw):
* tests/conform/test-mesh-interleved.c (queue_redraw):
* tests/conform/test-mesh-contiguous.c (queue_redraw): Added
missing return statement
* clutter/cogl/cogl-mesh.h: Add a declaration for
cogl_mesh_submit
* clutter/cogl/common/cogl-mesh.c (cogl_mesh_submit): Move the
documentation to cogl-mesh.h to match the rest of the functions
Robert Bragg [Mon, 10 Nov 2008 18:53:14 +0000 (18:53 +0000)]
Bug 1164 - Implements the proposed Mesh API
* clutter/cogl/cogl-mesh.h
* clutter/cogl/cogl-types.h
* clutter/cogl/cogl.h.in
* clutter/cogl/common/Makefile.am
* clutter/cogl/common/cogl-mesh-private.h
* clutter/cogl/common/cogl-mesh.c
* clutter/cogl/gl/cogl-context.c
* clutter/cogl/gl/cogl-context.h
* clutter/cogl/gl/cogl-defines.h.in
* clutter/cogl/gl/cogl.c
* clutter/cogl/gles/cogl-context.c
* clutter/cogl/gles/cogl-context.h
* doc/reference/cogl/cogl-docs.sgml
* doc/reference/cogl/cogl-sections.txt:
The Mesh API provides a means for submitting an extensible number of
per vertex attributes to OpenGL in a way that doesn't require format
conversions and so that the data can be mapped into the GPU (in vertex
buffer objects) for - hopefully - fast re-use.
There are a number of things we can potentially use this API for, but
right now this just provides a foundation to build on. Please read
the extensive list of TODO items in cogl-mesh.c for examples.
Please refer to the cogl-mesh section in the reference manual for
documentation of the API.
* tests/conform/Makefile.am
* tests/conform/test-conform-main.c
* tests/conform/test-mesh-contiguous.c
* tests/conform/test-mesh-interleved.c
* tests/conform/test-mesh-mutability.c:
Privides basic coverage testing for the mesh API.
Robert Bragg [Mon, 10 Nov 2008 18:52:50 +0000 (18:52 +0000)]
* tests/conform/ADDING_NEW_TESTS
* tests/conform/test-conform-common.c
* tests/conform/test-pick.c:
Instead of using clutter_stage_new /clutter_actor_destroy as a way to
avoid cascading side effects between unit tests, due to left over
actors, we now destroy all children of the default stage between
tests instead.
* tests/conform/wrapper.sh:
Adds a convenience note about how to run valgrind for an individual
unit test
Neil Roberts [Mon, 10 Nov 2008 16:30:42 +0000 (16:30 +0000)]
* tests/interactive/test-main.c (main): Allow more than two
arguments so that the remaining arguments can be passed to the
test. This is needed for test-behave for example which can take a
--path argument.
Emmanuele Bassi [Mon, 10 Nov 2008 12:29:10 +0000 (12:29 +0000)]
2008-11-10 Emmanuele Bassi <ebassi@linux.intel.com>
* clutter/clutter-texture.c: Remove an unused function.
Emmanuele Bassi [Mon, 10 Nov 2008 12:28:42 +0000 (12:28 +0000)]
2008-11-10 Emmanuele Bassi <ebassi@linux.intel.com>
* tests/conform/test-label-cache.c:
* tests/conform/test-pick.c:
* tests/conform/test-timeline.c: Show all the output messages only
if the test was done with the verbose flag turned on.
* tests/interactive/test-main.c: Do not use the (gpointer*) cast,
but use a temporary gpointer instead.
Robert Bragg [Mon, 10 Nov 2008 11:48:00 +0000 (11:48 +0000)]
* tests/conform/Makefile.am:
* tests/conform/wrapper.sh:
* tests/conform/test-conform-main.c:
* tests/conform/test-timeline.c:
Adds Neil's updates to test-timeline.c so it now works with the new unit
testing infrastructure.
Also some fixes to ensure wrappers get setup correctly for the timeline
tests.
* tests/interactive/test-main.c:
cast the symbol return pointer as (gpointer *) to avoid warning
* tests/conform/test-pick.c:
g_assert that the test passes, instead of using exit()
* test/conform/ADDING_NEW_TESTS:
Fixes a silly typo
Emmanuele Bassi [Sat, 8 Nov 2008 15:56:22 +0000 (15:56 +0000)]
2008-11-08 Emmanuele Bassi <ebassi@linux.intel.com>
* tests/conform/Makefile.am:
* tests/conform/test-actor-invariants.c:
* tests/conform/test-conform-main.c: Move the actor invariants
unit to the conform section of the test suite.
* tests/interactive/Makefile.am:
* tests/interactive/test-entry-auto.c:
* tests/interactive/test-invariants.c: Remove the entry-auto
and invariants test, since those two belong to the conform
section.
Robert Bragg [Fri, 7 Nov 2008 19:32:28 +0000 (19:32 +0000)]
Bug 1162 - Re-works the tests/ to use the glib-2.16 unit testing
framework
* configure.ac:
* tests/*:
The tests have been reorganised into different categories: conformance,
interactive and micro benchmarks.
- conformance tests can be run as part of automated tests
- interactive tests are basically all the existing tests
- micro benchmarks focus on a single performance metric
I converted the timeline tests to conformance tests and also added some
tests from Neil Roberts and Ebassi.
Note: currently only the conformance tests use the glib test APIs,
though the micro benchmarks should too.
The other change is to make the unit tests link into monolithic binaries
which makes the build time for unit tests considerably faster. To deal
with the extra complexity this adds to debugging individual tests I
have added some sugar to the makefiles so all the tests can be run
directly via a symlink and when an individual test is run this way,
then a note is printed to the terminal explaining exactly how that test
may be debugged using GDB.
There is a convenience make rule: 'make test-report', that will run all
the conformance tests and hopefully even open the results in your web
browser. It skips some of the slower timeline tests, but you can run
those using 'make full-report'