profile/ivi/clutter.git
13 years agowin32: remove env.sh generated by mingw-fetch-dependencies.sh
Robert Bragg [Tue, 15 Mar 2011 23:28:27 +0000 (23:28 +0000)]
win32: remove env.sh generated by mingw-fetch-dependencies.sh

Since there is very little now left in the env.sh file generated by
mingw-fetch-dependencies.sh it can be removed. What remained (The
CFLAGS="-mms-bitfields" and PKG_CONFIG_PATH=$ROOT_DIR/lib/pkgconfig) can
simply be passed explicitly when calling ./configure.

13 years agowin32: remove deprecated -mno-cygwin options from env.sh
Robert Bragg [Tue, 15 Mar 2011 22:47:20 +0000 (22:47 +0000)]
win32: remove deprecated -mno-cygwin options from env.sh

This removes the use of -mno-cygwin from our generated env.sh for cross
compiling with mingw.

I don't know that anyone is building clutter under cygwin, and our
BuildingClutterOnWindows wiki page only describes building with msys not
cygwin so I think its fair to assume that this build configuration is
untested and thus not supported by us currently. Since the -mno-cygwin
option is deprecated it could well be that there is a better
cross-compilation solution available for cygwin these days if you want
to build programs that don't depend on cygwin libraries.

13 years agowin32: Strip unneeded flags from env.sh
Robert Bragg [Tue, 15 Mar 2011 22:37:04 +0000 (22:37 +0000)]
win32: Strip unneeded flags from env.sh

This remove CXXFLAGS since we don't have any c++ code in Clutter and
also removes the redundant -L$ROOT_DIR/lib from LDFLAGS and
-I$ROOT_DIR/include from CPPFLAGS and CFLAGS. (These should get added by
pkg-config)

13 years agowin32: Add blurb at end of mingw helper script
Robert Bragg [Tue, 15 Mar 2011 22:19:08 +0000 (22:19 +0000)]
win32: Add blurb at end of mingw helper script

This adds some blurb at the end the mingw-fetch-dependencies.sh script
that gives an example of how to go on and build clutter after fetching
all dependencies.

13 years agowin32: support building json-glib in mingw script
Robert Bragg [Tue, 15 Mar 2011 21:58:15 +0000 (21:58 +0000)]
win32: support building json-glib in mingw script

Since Tor does not currently provide win32 binaries for json-glib we
need to cross compile it before we can build clutter. This extends
mingw-fetch-dependencies.sh so it can fetch, unpack and cross-compile
json-glib into the same prefix as the binary dependencies.

13 years agowin32: don't set CC,CPP,AR,NM,LD etc in mingw env.sh
Robert Bragg [Tue, 15 Mar 2011 20:17:21 +0000 (20:17 +0000)]
win32: don't set CC,CPP,AR,NM,LD etc in mingw env.sh

It shouldn't be necessary to explicitly override CC,CPP,AR,NM,LD etc in
the env.sh helper script that mingw-fetch-dependencies.sh generates.
Clutter's ./configure script should figure all of those out for us.

13 years agowin32: remove automatic build option from mingw script
Robert Bragg [Tue, 15 Mar 2011 20:04:15 +0000 (20:04 +0000)]
win32: remove automatic build option from mingw script

This removes the "Do you want to checkout and build Clutter?" option
from the mingw-cross-compile.sh script and renames the script
mingw-fetch-dependencies.sh

As it stands the mingw-cross-compile.sh script isn't enough to fetch all
the dependencies for building clutter, since Tor doesn't provide binaries
for json-glib so the option to checkout and build clutter can't work.

Also it doesn't seem ideal to clone a fresh clutter repo instead of
being able to compile the source of the current repo.

13 years agowin32: mkdir -p win32 needed for out of tree builds
Robert Bragg [Tue, 15 Mar 2011 19:37:26 +0000 (19:37 +0000)]
win32: mkdir -p win32 needed for out of tree builds

if cross compiling clutter using mingw using an out of tree build
directory then a pre-requisite for creating the resources.o file
containing the transparent cursor is for the win32 directory itself to
be created at $(top_builddir)/clutter/win32.

13 years agocogl: Use GHookList instead of CoglCallbackList
Neil Roberts [Mon, 14 Mar 2011 17:58:31 +0000 (17:58 +0000)]
cogl: Use GHookList instead of CoglCallbackList

glib already has a data type to manage a list of callbacks called a
GHookList so we might as well use it instead of maintaining Cogl's own
type. The glib version may be slightly more efficient because it
avoids using a GList and instead encodes the prev and next pointers
directly in the GHook structure. It also has more features than
CoglCallbackList.

13 years agoclutter.doap: Add my gnome userid
Emmanuele Bassi [Mon, 14 Mar 2011 14:17:14 +0000 (14:17 +0000)]
clutter.doap: Add my gnome userid

Not strictly needed, since we're not hosted on GNOME, but it can still
be useful when extracting meta-data from the DOAP file.

13 years agoAUTHORS: Note that the file is unmaintained
Emmanuele Bassi [Mon, 14 Mar 2011 14:16:16 +0000 (14:16 +0000)]
AUTHORS: Note that the file is unmaintained

The list of authors can be extracted from the Git log; the AUTHORS file
is maintained for mere historical reasons.

13 years agoREADME.md: fix a dumb typo
Emmanuele Bassi [Mon, 14 Mar 2011 14:00:12 +0000 (14:00 +0000)]
README.md: fix a dumb typo

13 years agoAdd MarkDown version of the README
Emmanuele Bassi [Mon, 14 Mar 2011 13:57:26 +0000 (13:57 +0000)]
Add MarkDown version of the README

13 years agostage: handle ACCEPT_FOCUS in set_/get_property
Øyvind Kolås [Fri, 11 Mar 2011 17:09:59 +0000 (17:09 +0000)]
stage: handle ACCEPT_FOCUS in set_/get_property

13 years agoculling: Don't cull actors not being painted on the stage
Robert Bragg [Thu, 10 Mar 2011 18:51:51 +0000 (18:51 +0000)]
culling: Don't cull actors not being painted on the stage

Previously we were applying the culling optimization to any actor
painted without considering that we may be painting to an offscreen
framebuffer where the stage clip isn't applicable.

For now we simply expose a getter for the current draw framebuffer
and we can assume that a return value of NULL corresponds to the
stage.

Note: This will need to be updated as stages start to be backed by real
CoglFramebuffer objects and so we won't get NULL in those cases.

13 years agodebug: Add more CLIPPING debug notes
Robert Bragg [Thu, 10 Mar 2011 18:50:23 +0000 (18:50 +0000)]
debug: Add more CLIPPING debug notes

To give quick visibility to the things going on relating to clipping and
culling this adds some more CLIPPING debug notes to clutter-actor.c and
clutter-stage.c

13 years agoculling: check volume->is_empty before ->is_complete
Robert Bragg [Thu, 10 Mar 2011 13:42:11 +0000 (13:42 +0000)]
culling: check volume->is_empty before ->is_complete

As documented in cogl-pipeline-private.h, there is a precedence to the
ClutterPaintVolume bitfields that should be considered whenever we
implement code that manipulates PaintVolumes...

Firstly if ->is_empty == TRUE then the values for ->is_complete and
->is_2d are undefined, so we should typically check ->is_empty as the
first priority.

This fixes a bug in _clutter_paint_volume_cull() whereby we were
checking pv->is_complete before checking pv->is_empty which was
resulting in assertions for actors with no size.

13 years agocogl-clip-state: Adapt to experimental cogl2 API.
Jasper St. Pierre [Wed, 2 Mar 2011 17:45:25 +0000 (12:45 -0500)]
cogl-clip-state: Adapt to experimental cogl2 API.

The current clip state implementation couldn't be used in
conjunction with the CoglPath experimental API.

http://bugzilla.clutter-project.org/show_bug.cgi?id=2594

Signed-off-by: Neil Roberts <neil@linux.intel.com>
13 years agocogl-path: Optimise paths that are just a rectangle
Neil Roberts [Wed, 9 Mar 2011 17:46:23 +0000 (17:46 +0000)]
cogl-path: Optimise paths that are just a rectangle

Drawing and clipping to paths is generally quite expensive because the
geometry has to be tessellated into triangles in a single VBO which
breaks up the journal batching. If we can detect when the path
contains just a single rectangle then we can instead divert to calling
cogl_rectangle which will take advantage of the journal, or by pushing
a rectangle clip which usually ends up just using the scissor.

This patch adds a boolean to each path to mark when it is a
rectangle. It gets cleared whenever a node is added or gets set to
TRUE whenever cogl2_path_rectangle is called. This doesn't try to
catch cases where a rectangle is composed by cogl_path_line_to and
cogl_path_move_to commands.

13 years agodrag-action: Allow using settings for the drag threshold
Emmanuele Bassi [Mon, 28 Feb 2011 17:47:50 +0000 (17:47 +0000)]
drag-action: Allow using settings for the drag threshold

ClutterDragAction should be able to use the newly added ClutterSettings
property exposing the system's drag threshold.

Currently, the x-drag-threshold and the y-drag-threshold properties (and
relative accessors) use an unsigned integer for their values; we should
be able to safely expand the range to include -1 as the minimum value,
and use this new value to tell the ClutterDragAction that it should query
the ClutterSettings object for the drag threshold.

The storage of the properties has been changed, albeit in a compatible
way, as GObject installs a uint ↔ int transformation function for GValue
automatically.

The setter for the drag thresholds has been changes to use a signed
integer, but the getter has been updated to always Do The Right Thing™:
it never returns -1 but, instead, will return the valid drag threshold,
either from the value set or from the Settings singleton.

This change is ABI compatible.

http://bugzilla.clutter-project.org/show_bug.cgi?id=2583

13 years agox11: Map Net/DndDragThreshold to ClutterSettings
Emmanuele Bassi [Mon, 28 Feb 2011 16:08:23 +0000 (16:08 +0000)]
x11: Map Net/DndDragThreshold to ClutterSettings

Simple mapping between XSETTINGS key and ClutterSettings property.

http://bugzilla.clutter-project.org/show_bug.cgi?id=2583

13 years agosettings: Add dnd-drag-threshold property
Emmanuele Bassi [Mon, 28 Feb 2011 16:46:27 +0000 (16:46 +0000)]
settings: Add dnd-drag-threshold property

The newly added ClutterSettings:dnd-drag-threshold stores the
threshold, in pixels, that should be passed by the cursor to
start a drag operation.

http://bugzilla.clutter-project.org/show_bug.cgi?id=2583

13 years agosettings: Clean up property installation code
Emmanuele Bassi [Mon, 28 Feb 2011 16:40:07 +0000 (16:40 +0000)]
settings: Clean up property installation code

Use g_object_class_install_properties().

http://bugzilla.clutter-project.org/show_bug.cgi?id=2583

13 years agodocs: Add an ClutterState definition section
Emmanuele Bassi [Wed, 9 Mar 2011 12:05:34 +0000 (12:05 +0000)]
docs: Add an ClutterState definition section

ClutterState is missing some documentation on how to define transitions
using ClutterScript definitions; it is also missing some example code
for both the C API and the ClutterScript syntax.

13 years agobox: Implement the correct paint volume
Emmanuele Bassi [Tue, 8 Mar 2011 19:23:34 +0000 (19:23 +0000)]
box: Implement the correct paint volume

The allocation of the ClutterBox is not enough to be used as the paint
volume, because children might decide to paint outside that area.

Instead, we should use the allocation if the Box has a background color
and then do what Group does, and union all the paint volumes of the
children.

http://bugzilla.clutter-project.org/show_bug.cgi?id=2600

13 years agocogl-shader-boilerplate: Specify default precision earlier
Neil Roberts [Tue, 8 Mar 2011 12:53:41 +0000 (12:53 +0000)]
cogl-shader-boilerplate: Specify default precision earlier

In 9ff04e8a99 the builtin uniforms were moved to the common shader
boilerplate. However the common boilerplate is positioned before the
default precision specifier on GLES2 so it would fail to compile
because the uniforms end up with no precision in the fragment
shader. This patch just moves the precision specifier to above the
common boilerplate.

13 years agoevent: Return the CrossingEvent.device field
Emmanuele Bassi [Tue, 8 Mar 2011 10:05:57 +0000 (10:05 +0000)]
event: Return the CrossingEvent.device field

The CLUTTER_ENTER and CLUTTER_LEAVE event types were mistakenly ignored
by clutter_event_get_device(), when returning the device from a
non-allocated ClutterEvent.

13 years agowin32/event: Set the core pointer directly
Emmanuele Bassi [Tue, 8 Mar 2011 10:01:53 +0000 (10:01 +0000)]
win32/event: Set the core pointer directly

Since we have a ClutterInputDevice pointer already we can just set it
instead of using event->crossing.device.

13 years agoevent: Set the CrossingEvent device field
Emmanuele Bassi [Tue, 8 Mar 2011 10:01:06 +0000 (10:01 +0000)]
event: Set the CrossingEvent device field

The CLUTTER_ENTER and CLUTTER_LEAVE should also have their device field
set when calling clutter_event_set_device().

13 years agoclutter-actor: Fix test for avoiding calculating the paint volume
Neil Roberts [Mon, 7 Mar 2011 15:35:05 +0000 (15:35 +0000)]
clutter-actor: Fix test for avoiding calculating the paint volume

There's an optimisation in clutter-actor.c to avoid calculating the
last known paint volume whenever culling and clipped redraws are both
disabled. However there was a small thinko in the logic so that it
would also avoid calculating the paint volume whenever only one of the
debug flags is enabled. This fixes it to explicitly check that the two
flags are not both enabled before skipping the paint volume
calculation.

13 years agoutil: optimize _clutter_util_fully_transform_vertices
Robert Bragg [Tue, 8 Feb 2011 10:37:15 +0000 (10:37 +0000)]
util: optimize _clutter_util_fully_transform_vertices

Instead of unconditionally combining the modelview and projection
matrices and then iterating each of the vertices to call
cogl_matrix_transform_point for each one in turn we now only combine the
matrices if there are more than 4 vertices (with less than 4 vertices
its less work to transform them separately) and we use the new
cogl_vertex_{transform,project}_points APIs which can hopefully
vectorize the transformations.

Finally the perspective divide and viewport scale is done in a separate
loop at the end and we don't do the spurious perspective divide and
viewport scale for the z component.

13 years agoactor: Cache per-actor transforms
Robert Bragg [Fri, 4 Feb 2011 09:17:16 +0000 (09:17 +0000)]
actor: Cache per-actor transforms

Previously each time we needed to retrieve the model transform for a
given actor we would call the apply_transform vfunc which would build up
a transformation matrix based on the actor's current anchor point, its
scale, its allocation and rotation. The apply_transform implementation
would repeatedly call API like cogl_matrix_rotate, cogl_matrix_translate
and cogl_matrix_scale.

All this micro matrix manipulation APIs were starting to show up in the
profiles of dynamic applications so this adds priv->transform matrix
cache which maintains the combined result of the actors scale, rotation
and anchor point etc. Whenever something like the rotation changes then
then the matrix is marked as dirty, but so long as the matrix isn't
dirty then the apply_transform vfunc now just calls cogl_matrix_multiply
with the cached transform matrix.

13 years agoOptimize culling by doing culling in eye-coordinates
Robert Bragg [Tue, 1 Feb 2011 18:32:08 +0000 (18:32 +0000)]
Optimize culling by doing culling in eye-coordinates

This implements a variation of frustum culling whereby we convert screen
space clip rectangles into eye space mini-frustums so that we don't have
to repeatedly transform actor paint-volumes all the way into screen
coordinates to perform culling, we just have to apply the modelview
transform and then determine each points distance from the planes that
make up the clip frustum.

By avoiding the projective transform, perspective divide and viewport
scale for each point culled this makes culling much cheaper.

13 years agostage: simplify apply_transform
Robert Bragg [Tue, 8 Feb 2011 14:46:31 +0000 (14:46 +0000)]
stage: simplify apply_transform

This simplifies the implementation of the ClutterStage apply_transform
vfunc by using the new cogl_matrix_view_2d_in_perspective utility API
which can setup up a view transform for a given perspective so that a
cross section of the view frustum at an arbitrary depth can be mapped
directly to 2D stage coordinates with (0,0) at the top left.

13 years agomatrix: adds 2d view transform conveniences
Robert Bragg [Tue, 8 Feb 2011 15:21:41 +0000 (15:21 +0000)]
matrix: adds 2d view transform conveniences

This adds two new experimental functions to cogl-matrix.c:
cogl_matrix_view_2d_in_perspective and cogl_matrix_view_2d_in_frustum
which can be used to setup a view transform that maps a 2D coordinate
system (0,0) top left and (width,height) bottom right to the current
viewport.

Toolkits such as Clutter that want to mix 2D and 3D drawing can use
these APIs to position a 2D coordinate system at an arbitrary depth
inside a 3D perspective projected viewing frustum.

13 years agostage: don't call glGetIntegerv in clutter_stage_read_pixels
Robert Bragg [Tue, 1 Feb 2011 18:15:50 +0000 (18:15 +0000)]
stage: don't call glGetIntegerv in clutter_stage_read_pixels

Firstly Clutter shouldn't be using OpenGL directly so this needed
changing but also conceptually it doesn't make sense for
clutter_stage_read_pixels to validate the requested area to read against
the viewport it would make more sense to compare against the window
size. Finally checking that the width of the area is less than the
viewport or window width without considering the x isn't enough to know
if the area extends outside the windows bounds. (same for the height)

This patch removes the validation of the read area from
clutter_stage_read_pixels and instead we now simply rely on the
semantics of cogl_read_pixels for reading areas outside the window
bounds.

13 years agoviewport: consistently use floats for viewports
Robert Bragg [Tue, 1 Feb 2011 16:51:58 +0000 (16:51 +0000)]
viewport: consistently use floats for viewports

OpenGL < 4.0 only supports integer based viewports and internally we
have a mixture of code using floats and integers for viewports. This
patch switches all viewports throughout clutter and cogl to be
represented using floats considering that in the future we may want to
take advantage of floating point viewports with modern hardware/drivers.

13 years agoutil: tune point_in_poly test for polys in screen coords
Robert Bragg [Thu, 3 Mar 2011 23:19:30 +0000 (23:19 +0000)]
util: tune point_in_poly test for polys in screen coords

This makes a change to the original point_in_poly algorithm from:
http://www.ecse.rpi.edu/Homepages/wrf/Research/Short_Notes/pnpoly.html

The aim was to tune the test so that tests against screen aligned
rectangles are more resilient to some in-precision in how we transformed
that rectangle into screen coordinates. In particular gnome-shell was
finding that for some stage sizes then row 0 of the stage would become a
dead zone when going through the software picking fast-path and this was
because the y position of screen aligned rectangles could end up as
something like 0.00024 and the way the algorithm works it doesn't have
any epsilon/fuz factor to consider that in-precision.

We've avoided introducing an epsilon factor to the comparisons since we
feel there's a risk of changing some semantics in ways that might not be
desirable. One of those is that if you transform two polygons which
share an edge and test a point close to that edge then this algorithm
will currently give a positive result for only one polygon.

Another concern is the way this algorithm resolves the corner case where
the horizontal ray being cast to count edge crossings may cross directly
through a vertex. The solution is based on the "idea of Simulation of
Simplicity" and "pretends to shift the ray infinitesimally down so that
it either clearly intersects, or clearly doesn't touch". I'm not
familiar with the idea myself so I expect a misplaced epsilon is likely
to break that aspect of the algorithm.

The simple solution this patch applies is to pixel align the polygon
vertices which should eradicate most noise due to in-precision.

https://bugzilla.gnome.org/show_bug.cgi?id=641197

13 years agoglx: Use g_set_error_literal() where appropriate
Emmanuele Bassi [Fri, 4 Mar 2011 23:58:12 +0000 (23:58 +0000)]
glx: Use g_set_error_literal() where appropriate

13 years agoOn error, return FALSE in the post_parse hook
Emmanuele Bassi [Fri, 4 Mar 2011 23:56:12 +0000 (23:56 +0000)]
On error, return FALSE in the post_parse hook

Anything that is not CLUTTER_INIT_SUCCESS is to be considered an error.

This fixes the Clutter initialization sequence to actually error out
on pre-conditions and backend initialization failures.

13 years agoClean up argument parsing GError handling
Emmanuele Bassi [Fri, 4 Mar 2011 23:55:02 +0000 (23:55 +0000)]
Clean up argument parsing GError handling

Pass a GError in, so that clutter_init() can effectively print out a
critical warning on initialization failure, like it used to do in the
olden days.

13 years agox11: Use g_set_error_literal()
Emmanuele Bassi [Fri, 4 Mar 2011 23:53:45 +0000 (23:53 +0000)]
x11: Use g_set_error_literal()

The g_set_error() function takes a format string.

13 years agoclutter-offscreen-effect: Use 0,0 as the offset if no actor box
Neil Roberts [Fri, 4 Mar 2011 17:04:02 +0000 (17:04 +0000)]
clutter-offscreen-effect: Use 0,0 as the offset if no actor box

clutter_offscreen_effect_pre_paint was using the unitialized value of
the ‘box’ variable whenever the actor doesn't have a paint
volume. This patch makes it just set the offset to 0,0 instead.

13 years agoclutter-offscreen-effect: Preserve the old opacity override
Neil Roberts [Thu, 3 Mar 2011 16:46:26 +0000 (16:46 +0000)]
clutter-offscreen-effect: Preserve the old opacity override

When removing the opacity override in the post_paint implementation,
ClutterOffscreenEffect would always set the override back to -1. This
ends up cancelling out the effect of any overrides from outer effects
which means that if any actor has multiple effects attached then it
would apply the opacity multiple times.

To fix this, the effect now preserves the old value of the opacity
override and restores that instead of setting -1.

http://bugzilla.clutter-project.org/show_bug.cgi?id=2541

13 years agoclutter-actor: Add an internal _clutter_actor_get_opacity_override
Neil Roberts [Tue, 1 Mar 2011 19:52:43 +0000 (19:52 +0000)]
clutter-actor: Add an internal _clutter_actor_get_opacity_override

This is needed if an effect wants to temporarily override the paint
opacity. It needs to be able to restore the old opacity override in
the post_paint handler otherwise it would replace the effect of the
opacity override from any outer effects.

http://bugzilla.clutter-project.org/show_bug.cgi?id=2541

13 years agoRemove private helper #define's
Jasper St. Pierre [Thu, 3 Mar 2011 11:35:46 +0000 (06:35 -0500)]
Remove private helper #define's

Finish off the second half of 09a830d294.

http://bugzilla.clutter-project.org/show_bug.cgi?id=2596

13 years agobox: set default paint volume to allocation
Dioselin [Tue, 1 Mar 2011 22:05:11 +0000 (14:05 -0800)]
box: set default paint volume to allocation

http://bugzilla.clutter-project.org/show_bug.cgi?id=2589

13 years agoeffect: Queue a redraw on :enabled changes
Emmanuele Bassi [Tue, 1 Mar 2011 18:36:55 +0000 (18:36 +0000)]
effect: Queue a redraw on :enabled changes

ClutterEffect should queue a redraw if the :enabled property of its
parent class ClutterActorMeta changes.

http://bugzilla.clutter-project.org/show_bug.cgi?id=2587

13 years agoconstraint: Queue a relayout on :enabled changes
Emmanuele Bassi [Tue, 1 Mar 2011 18:36:08 +0000 (18:36 +0000)]
constraint: Queue a relayout on :enabled changes

ClutterConstraint should queue a relayout if the :enabled property of
its parent class ClutterActorMeta changes.

http://bugzilla.clutter-project.org/show_bug.cgi?id=2587

13 years agooffscreen-effect: Add public accessor for target size
Emmanuele Bassi [Mon, 28 Feb 2011 14:31:59 +0000 (14:31 +0000)]
offscreen-effect: Add public accessor for target size

The OffscreenEffect class needs to expose a way for sub-classes to
track the size of FBO it creates, in case it has to do some geometry
deformations like the DeformEffect sub-classes.

Let's move the private symbol we used internally in 1.6 to fix
DeformEffect to the list of public symbols of OffscreenEffect.

http://bugzilla.clutter-project.org/show_bug.cgi?id=2570

13 years agoMove the keysym ↔ Unicode table to .rodata
Emmanuele Bassi [Mon, 28 Feb 2011 14:02:00 +0000 (14:02 +0000)]
Move the keysym ↔ Unicode table to .rodata

The table we use for converting between keysyms and Unicode should be
static and constified, so that it can live in the .rodata section of
the ELF shared object, and be shared among processes.

This change moves the table to a source file, instead of an header; the
change also requires the clutter_keysym_to_unicode() function to be
moved from clutter-event.c into this new source file. The declaration is
still in clutter-event.h, so we don't need to do anything special.

13 years agobuild: Show CFLAGS in the configure summary
Emmanuele Bassi [Mon, 28 Feb 2011 12:49:48 +0000 (12:49 +0000)]
build: Show CFLAGS in the configure summary

Don't show just the maintainer flags, but the whole shebang.

13 years agoevent: Add setters for ClutterEvent members
Emmanuele Bassi [Tue, 22 Feb 2011 17:12:34 +0000 (17:12 +0000)]
event: Add setters for ClutterEvent members

Creating a synthetic event requires direct access to the ClutterEvent
union members; this access does not map in bindings to high-level
languages, especially run-time bindings using GObject-Introspection.
It's also midly annoying from C, as it unnecessarily exposes the guts of
ClutterEvent - something we might want to fix in the future.

http://bugzilla.clutter-project.org/show_bug.cgi?id=2575

13 years agotests: Check return value of clutter_init_with_args instead of error
Neil Roberts [Tue, 22 Feb 2011 12:53:15 +0000 (12:53 +0000)]
tests: Check return value of clutter_init_with_args instead of error

Some of the tests were ignoring the return value of
clutter_init_with_args and instead they would recognise an error by
seeing whether the GError parameter was set. This patch changes it to
check the return value so that it won't give a warning now that
G_GNUC_WARN_UNUSED_RESULT is on that function.

http://bugzilla.clutter-project.org/show_bug.cgi?id=2574

13 years agoAdd G_GNUC_WARN_UNUSED_RESULT to clutter_init and init_with_args
Neil Roberts [Tue, 22 Feb 2011 12:38:19 +0000 (12:38 +0000)]
Add G_GNUC_WARN_UNUSED_RESULT to clutter_init and init_with_args

Many people expect clutter_init to work the same way as gtk_init which
exits the program on init failure. clutter_init however returns a
status code on failure which applications need to handle because if
the init fails then any further Clutter calls are likely to crash. In
Clutter 2.0 we may want to change this to be more like GTK+.

http://bugzilla.clutter-project.org/show_bug.cgi?id=2574

13 years agodoc: fix clutter_init() usage in examples
nobled [Tue, 22 Feb 2011 00:44:55 +0000 (00:44 +0000)]
doc: fix clutter_init() usage in examples

Make sure users get the idea that clutter_init()
has a return value that needs to be checked.

These were fixed via sed magic:

sed -i -s -e "s/clutter_init (.*)/\
if (& != CLUTTER_INIT_SUCCESS)\n    return 1/"\
 doc/*/*/*.{c,xml} doc/*/*.xml

http://bugzilla.clutter-project.org/show_bug.cgi?id=2574

13 years agotests: abort if clutter_init fails
nobled [Tue, 22 Feb 2011 00:19:35 +0000 (00:19 +0000)]
tests: abort if clutter_init fails

This fixes segfaults when something goes wrong during
init, but the test keeps going anyway.

Except for test-easing and test-picking, these were fixed by
sed magic:

sed -i -s -e "s/clutter_init \?(&argc, &argv)/\
if (clutter_init (\&argc, \&argv) != CLUTTER_INIT_SUCCESS)\n\
    return 1/" tests/*/*.c

http://bugzilla.clutter-project.org/show_bug.cgi?id=2574

13 years agoStart 1.7 development cycle
Emmanuele Bassi [Mon, 28 Feb 2011 11:24:14 +0000 (11:24 +0000)]
Start 1.7 development cycle

13 years agoAdd a conformance test for atlas migration
Neil Roberts [Thu, 24 Feb 2011 20:30:30 +0000 (20:30 +0000)]
Add a conformance test for atlas migration

This adds a conformance test which creates a lot of textures with
increasing size and destroys them again a number of times in order to
cause a few atlas migrations. The last time the textures are created
they are all read back and the data is verified to confirm that the
atlas migration successfully preserved the data.

13 years agocogl-blit: Disable blending when using texture render
Neil Roberts [Thu, 24 Feb 2011 18:42:47 +0000 (18:42 +0000)]
cogl-blit: Disable blending when using texture render

When using a pipeline and the journal to blit images between
framebuffers, it should disable blending. Otherwise it will end up
blending the source texture with uninitialised garbage in the
destination texture.

13 years agobuild: Remove MAINTAINERCLEANFILES from ChangeLog rules
Emmanuele Bassi [Wed, 23 Feb 2011 00:07:12 +0000 (00:07 +0000)]
build: Remove MAINTAINERCLEANFILES from ChangeLog rules

13 years agobuild: Remove maintainer-clean rule
Emmanuele Bassi [Tue, 22 Feb 2011 18:32:01 +0000 (18:32 +0000)]
build: Remove maintainer-clean rule

The maintainer-clean files list is horribly out of date, nobody is
maintaining it, and it's honestly easier to use `git clean -xdf`
instead to clean untracked files.

13 years agoMerge remote-tracking branch 'elliot/cookbook-effects-custom-deform'
Emmanuele Bassi [Mon, 21 Feb 2011 18:09:06 +0000 (18:09 +0000)]
Merge remote-tracking branch 'elliot/cookbook-effects-custom-deform'

* elliot/cookbook-effects-custom-deform:
  docs: Add effects chapter, with introduction and first recipe

13 years agotext: Round up the size
Emmanuele Bassi [Mon, 21 Feb 2011 17:13:37 +0000 (17:13 +0000)]
text: Round up the size

Converting from Pango units to pixels by using the C conventions might
cause us to lose a pixel; since we're doing the same for the height, we
should use ceilf() to round up the width and the line height.

http://bugzilla.clutter-project.org/show_bug.cgi?id=2573

13 years agodocs: Add effects chapter, with introduction and first recipe
Elliot Smith [Mon, 21 Feb 2011 16:43:34 +0000 (16:43 +0000)]
docs: Add effects chapter, with introduction and first recipe

Add an effects chapter which gives a broad overview of
the abstract classes in the effects API, plus a short
example of how to apply one of the stock Clutter
effects (ClutterColorizeEffect).

The recipe explains how to create a custom ClutterDeformEffect
to produce a page fold (code based on ClutterPageTurnEffect).

The example code includes the effect class plus a small
application to apply it to a texture.

13 years agodocs: Mention the cookbook in the README
Emmanuele Bassi [Mon, 21 Feb 2011 16:41:28 +0000 (16:41 +0000)]
docs: Mention the cookbook in the README

In the "Resources" section, along with the API references.

13 years agodocs: Remove last mention of SDL from the README
Emmanuele Bassi [Mon, 21 Feb 2011 16:40:50 +0000 (16:40 +0000)]
docs: Remove last mention of SDL from the README

We don't support SDL since forever, now. Just get rid of it, before it
confuses somebody.

13 years agoPost-release version bump to 1.6.7
Emmanuele Bassi [Mon, 21 Feb 2011 14:19:47 +0000 (14:19 +0000)]
Post-release version bump to 1.6.7

13 years agoRelease Clutter 1.6.6 (stable)
Emmanuele Bassi [Mon, 21 Feb 2011 12:47:09 +0000 (12:47 +0000)]
Release Clutter 1.6.6 (stable)

13 years agobuild: Use all-am, not all as the gitignore target
Emmanuele Bassi [Mon, 21 Feb 2011 12:46:34 +0000 (12:46 +0000)]
build: Use all-am, not all as the gitignore target

13 years agodevice-manager/xi2: Silence a compiler warning
Emmanuele Bassi [Sat, 19 Feb 2011 16:48:59 +0000 (16:48 +0000)]
device-manager/xi2: Silence a compiler warning

13 years agotests: Remove unused variables
Emmanuele Bassi [Sat, 19 Feb 2011 16:46:44 +0000 (16:46 +0000)]
tests: Remove unused variables

13 years agotest-timeline: Ignore the default stage
Emmanuele Bassi [Sat, 19 Feb 2011 16:45:51 +0000 (16:45 +0000)]
test-timeline: Ignore the default stage

We need to create the default stage to have the master clock spin, but
we can tell the compiler that the returned value is meaningless.

13 years agocally: Remove unused variables
Emmanuele Bassi [Sat, 19 Feb 2011 16:45:35 +0000 (16:45 +0000)]
cally: Remove unused variables

13 years agoclutter: Remove unused variables
Emmanuele Bassi [Sat, 19 Feb 2011 16:45:06 +0000 (16:45 +0000)]
clutter: Remove unused variables

13 years agox11: Remove unused variables
Emmanuele Bassi [Sat, 19 Feb 2011 16:44:38 +0000 (16:44 +0000)]
x11: Remove unused variables

13 years agocogl: Remove unused variables
Emmanuele Bassi [Sat, 19 Feb 2011 16:43:46 +0000 (16:43 +0000)]
cogl: Remove unused variables

13 years agodeform-effect: Use the FBO target size
Emmanuele Bassi [Sat, 19 Feb 2011 09:17:25 +0000 (09:17 +0000)]
deform-effect: Use the FBO target size

The ClutterDeformEffect sub-classes are effectively deforming the
texture target of an FBO, not the actor itself. Thus, we need to
use the FBO's size, and not the actor's allocated size, given that
the actor might be transformed prior to applying an effect.

http://bugzilla.clutter-project.org/show_bug.cgi?id=2571

13 years agooffscreen-effect: Add private API for getting the target size
Emmanuele Bassi [Sat, 19 Feb 2011 09:15:34 +0000 (09:15 +0000)]
offscreen-effect: Add private API for getting the target size

Since the FBO target might have a different size than the mere paint box
of the actor, we need API to get it out of the ClutterOffscreenEffect
private data structure and on to sub-classes.

Since we cannot add new API in a stable cycle, we need a private
function; we'll leave it there even when opening 1.7, since it's useful
for internal purposes.

13 years agoUpdate NEWS
Emmanuele Bassi [Sat, 19 Feb 2011 09:04:46 +0000 (09:04 +0000)]
Update NEWS

13 years agobuild: Centralize X11 extensions versioning
Emmanuele Bassi [Sat, 19 Feb 2011 09:02:51 +0000 (09:02 +0000)]
build: Centralize X11 extensions versioning

Similar to what we did for the base dependencies.

13 years agodrag-action: Use per-stage motion event toggle
Emmanuele Bassi [Fri, 18 Feb 2011 19:28:48 +0000 (19:28 +0000)]
drag-action: Use per-stage motion event toggle

Similar to what we did for the ClutterDeviceManager, use per-stage
granularity when toggling the motion event delivery while dragging.

13 years agodevice-manager: Use per-stage motion event toggle
Emmanuele Bassi [Fri, 18 Feb 2011 19:27:58 +0000 (19:27 +0000)]
device-manager: Use per-stage motion event toggle

Now that we have internal support for per-stage granularity of motion
event delivery, let's use it when updating the state of the input
devices.

13 years agoStore the motion event deliver flag in ClutterStage
Emmanuele Bassi [Fri, 18 Feb 2011 17:19:04 +0000 (17:19 +0000)]
Store the motion event deliver flag in ClutterStage

Once upon a time, the land of Clutter had a stage singleton. It was
created automatically at initialization time and stayed around even
after the main loop was terminated. The singleton was content in
being all there was. There also was a global API to handle the
configuration of the stage singleton that would affect the behaviour
on other classes, signals and properties.

Then, an evil wizard came along and locked the stage singleton in his
black tower, and twisted it until it was possible to create new stages.
These new stages were pesky, and didn't have the same semantics of the
singleton: they didn't stay around when closed, or terminate the main
loop on delete events.

The evil wizard also started moving all the stage-related API from the
global context into class-specific methods.

Finally, the evil wizard cast a spell, and the stage singleton was
demoted to creation on demand - and until somebody called the
clutter_stage_get_default() function, the singleton remained in a limbo
of NULL pointers and undefined memory areas.

There was a last bit - literally - of information still held by the
global API; a tiny, little flag that disabled per-actor motion events.
The evil wizard added private accessors for it, and stored it inside the
stage private structure, in preparation for a deprecation that would
come in a future development cycle.

The evil wizard looked down upon the land of Clutter from the height of
his black tower; the lay of the land had been reshaped into a crucible
of potential, and the last dregs of the original force of creation were
either molted into new, useful shapes, or blasted away by the sheer fury
of his will.

All was good.

13 years agoAssert if we call backend API without a valid backend
Emmanuele Bassi [Fri, 18 Feb 2011 17:18:05 +0000 (17:18 +0000)]
Assert if we call backend API without a valid backend

This is a backend programming error, and we should not tolerate
failures in these cases.

13 years agoClean up clutter-private.h
Emmanuele Bassi [Fri, 18 Feb 2011 16:53:58 +0000 (16:53 +0000)]
Clean up clutter-private.h

Move macros at the top, and clean up whitespace.

13 years agoMove ActorMeta private function in the private header
Emmanuele Bassi [Fri, 18 Feb 2011 16:53:31 +0000 (16:53 +0000)]
Move ActorMeta private function in the private header

No reason to leave it in the installed header.

13 years agoAdd private header for event-related API
Emmanuele Bassi [Fri, 18 Feb 2011 16:27:49 +0000 (16:27 +0000)]
Add private header for event-related API

13 years agoMove ClutterEffect private symbols to a private header
Emmanuele Bassi [Fri, 18 Feb 2011 16:00:39 +0000 (16:00 +0000)]
Move ClutterEffect private symbols to a private header

No point in cluttering up clutter-private.h even more than necessary.

13 years agoPrivatize all ClutterIdPool functions
Emmanuele Bassi [Fri, 18 Feb 2011 15:53:27 +0000 (15:53 +0000)]
Privatize all ClutterIdPool functions

The clutter-id-pool.h header is private and not installed; yet, all the
clutter_id_pool_* symbols are public. Let's correct this oversight we've
been stringing along since forever.

13 years agoClean up usage of CLUTTER_CONTEXT and remove the macro
Emmanuele Bassi [Fri, 18 Feb 2011 15:47:35 +0000 (15:47 +0000)]
Clean up usage of CLUTTER_CONTEXT and remove the macro

Only allow access to the ClutterMainContext through the private
_clutter_context_get_default() function, so we can easily grep
it and remove the unwanted usage of the global context.

13 years agoWrap id-pool access
Emmanuele Bassi [Fri, 18 Feb 2011 15:46:13 +0000 (15:46 +0000)]
Wrap id-pool access

The ClutterIdPool is held by the ClutterMainContext; we should hide its
direct usage into sensible private API.

13 years agoWrap shader stack into private functions
Emmanuele Bassi [Fri, 18 Feb 2011 15:44:17 +0000 (15:44 +0000)]
Wrap shader stack into private functions

The shader stack held by ClutterMainContext should only be accessed
using functions, and not directly.

Since it's a stack, we can use stack-like operations: push, pop and
peek.

13 years agostage: Make the redraw_count a stage counter
Emmanuele Bassi [Fri, 18 Feb 2011 14:38:54 +0000 (14:38 +0000)]
stage: Make the redraw_count a stage counter

We don't care about redraws issued on stages that are not currently
being repainted.

13 years agoMake _clutter_pixel_to_id() private
Emmanuele Bassi [Fri, 18 Feb 2011 14:38:24 +0000 (14:38 +0000)]
Make _clutter_pixel_to_id() private

It's only used in the same file that declares it.

13 years agostage: Move stage redraw logic into clutter-stage.c
Emmanuele Bassi [Fri, 18 Feb 2011 12:56:17 +0000 (12:56 +0000)]
stage: Move stage redraw logic into clutter-stage.c

The _clutter_do_redraw() function should really be moved inside
ClutterStage, since all it does is calling private stage and
backend functions. This also allows us to change a long-standing
issue with a global fps counter for all stages, instead of a\
per-stage one.

13 years agoContinue hiding the ClutterMainContext
Emmanuele Bassi [Fri, 18 Feb 2011 12:07:07 +0000 (12:07 +0000)]
Continue hiding the ClutterMainContext

We should strive to make the main context as transparent as possible,
and hide accessing its data through private functions.

13 years agoactor: Move the ShaderData out of the private data
Emmanuele Bassi [Fri, 18 Feb 2011 11:43:27 +0000 (11:43 +0000)]
actor: Move the ShaderData out of the private data

Let's try and start reducing the size of ClutterActorPrivate by moving
some optional, out-of-band data from it to GObject data.

The ShaderData structure is a prime candidate for this migration: it
does not need to be inspected by the actor, and its relationship with an
actor is transient and optional.

By attaching it to the actor's instance through g_object_set_data() we
neatly tie its lifetime to the instance, and we don't have to care
cleaning it up in the finalize()/dispose() implementation of
ClutterActor itself.

13 years agocogl-atlas-texture: Don't let textures be destroyed during migration
Neil Roberts [Thu, 17 Feb 2011 13:11:34 +0000 (13:11 +0000)]
cogl-atlas-texture: Don't let textures be destroyed during migration

If an atlas texture's last reference is held by the journal or by the
last flushed pipeline then if an atlas migration is started it can
cause a crash. This is because the atlas migration will cause a
journal flush and can sometimes change the current pipeline which
means that the texture would be destroyed during migration.

This patch adds an extra 'post_reorganize' callback to the existing
'reorganize' callback (which is now renamed to 'pre_reorganize'). The
pre_reorganize callback is now called before the atlas grabs a list of
the current textures instead of after so that it doesn't matter if the
journal flush destroys some of those textures. The pre_reorganize
callback for CoglAtlasTexture grabs a reference to all of the textures
so that they can not be destroyed when the migration changes the
pipeline. In the post_reorganize callback the reference is removed
again.

http://bugzilla.clutter-project.org/show_bug.cgi?id=2538

13 years agoclutter-actor: Free the paint volume when queue a clip redraw
Neil Roberts [Wed, 16 Feb 2011 18:42:33 +0000 (18:42 +0000)]
clutter-actor: Free the paint volume when queue a clip redraw

In _clutter_actor_queue_redraw_with_clip it has a local variable to
mark when a new paint volume for the clip is created so that it can be
freed when the function returns. However the actual code to free the
paint volume went missing in 3b789490d2c so the variable did
nothing. This patch just adds the free back in.