profile/ivi/clutter.git
13 years agoscript-parser: Apply child and layout properties to the right actor
Bastian Winkler [Tue, 24 Aug 2010 10:16:50 +0000 (12:16 +0200)]
script-parser: Apply child and layout properties to the right actor

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

Signed-off-by: Emmanuele Bassi <ebassi@linux.intel.com>
13 years agowin32: Fix the check for the 'IN_DESTRUCTION' flag
Neil Roberts [Tue, 24 Aug 2010 19:00:04 +0000 (20:00 +0100)]
win32: Fix the check for the 'IN_DESTRUCTION' flag

Commit eae45619299 tried to clean how it checks for the private actor
flags. However the check for the 'IN_DESTRUCTION' flag in the Win32
backend got inverted so it would always clear the current
context. This was causing _cogl_check_driver_valid to fail later and
then the realize would get stuck in a infinite loop.

13 years agostate: clutter_state_remove_key_internal fix memory corruption
Øyvind Kolås [Tue, 17 Aug 2010 12:22:08 +0000 (13:22 +0100)]
state: clutter_state_remove_key_internal fix memory corruption

When we free a state because there are no more keys with it as a target use a
goto to re-initialize temporary variables that have become invalid.

Fixing bug #2273

13 years agoInvert the check for whether to clip the pick
Neil Roberts [Mon, 23 Aug 2010 10:36:33 +0000 (11:36 +0100)]
Invert the check for whether to clip the pick

In 965907deb3f9e the picking was changed to render the full stage
instead of a single pixel whenever picking is performed more than once
between paints. However the condition in the if-statement was
backwards so it would end up always doing a full stage render.

13 years agoAdd some debugging notes for picking
Neil Roberts [Mon, 23 Aug 2010 10:33:22 +0000 (11:33 +0100)]
Add some debugging notes for picking

This adds a new CLUTTER_DEBUG option for picking. Currently this just
reports the position for each pick and whether it is clipped or not.

13 years agoHide internal glx and egl(x) backend symbols.
Alexandros Frantzis [Fri, 13 Aug 2010 14:48:30 +0000 (17:48 +0300)]
Hide internal glx and egl(x) backend symbols.

The glx and egl(x) backends export some internal symbols. Hide these
symbols (using '_' prefix) to reduce ABI differentiation between the
glx and eglx flavours.

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

Signed-off-by: Emmanuele Bassi <ebassi@linux.intel.com>
13 years agobox-layout: Use the correct name for the arguments
Emmanuele Bassi [Fri, 20 Aug 2010 16:03:06 +0000 (17:03 +0100)]
box-layout: Use the correct name for the arguments

Since we're getting the preferred height for a given width, the width
argument should be named "for_width" and not "for_height".

13 years agoMerge remote branch 'elliot/cookbook-textures-crossfade'
Emmanuele Bassi [Fri, 20 Aug 2010 14:24:42 +0000 (15:24 +0100)]
Merge remote branch 'elliot/cookbook-textures-crossfade'

* elliot/cookbook-textures-crossfade:
  cookbook: Use GdkPixbuf instead of getting data from a texture
  cookbook: Added a recipe for cross-fading between two images
  cookbook: Modified COGL example for consistency
  cookbook: Added video of two texture cross-fade
  cookbook: Removed unused constant
  cookbook: Renamed front/back to top/bottom in cross-fade example
  cookbook: Don't need to set keep-aspect-ratio for simple example
  cookbook: Modified ordering of statements in cross-fade example
  cookbook: Added a longer slideshow example
  cookbook: Made code examples more consistent
  cookbook: Added example code for texture cross-fading
  Post-release version bump to 1.3.13
  Release Clutter 1.3.12 (developers snapshot)

Conflicts:
doc/cookbook/examples/Makefile.am

13 years agocookbook: Added recipe for handling pointer events on an actor
Elliot Smith [Fri, 20 Aug 2010 12:54:04 +0000 (13:54 +0100)]
cookbook: Added recipe for handling pointer events on an actor

Added a recipe about handling enter, leave, and motion events
on an actor.

Gives some pointers to data available from motion events,
explains a bit about stage-relative and actor-relative coords,
and covers how overlapping actors and reactivity of actors
can affect events occurring.

Examples include a simple scribble app showing how to integrate
pointer events into a more useful context.

13 years agocookbook: Added example to show how stacking affects pointer events
Elliot Smith [Fri, 20 Aug 2010 11:38:35 +0000 (12:38 +0100)]
cookbook: Added example to show how stacking affects pointer events

Added another example (used for a screenshot) to demonstrate
how pointer events pass through non-reactive actors and how
depth ordering affects whether an actor will emit a pointer
motion signal.

13 years agocookbook: Use get_coords rather than struct members
Elliot Smith [Fri, 20 Aug 2010 10:25:40 +0000 (11:25 +0100)]
cookbook: Use get_coords rather than struct members

Use clutter_event_get_coords() to get x and y position,
rather than casting to the right event type then directly
accessing members of the event struct.

13 years agocookbook: Made callback names more consistent
Elliot Smith [Thu, 19 Aug 2010 16:50:25 +0000 (17:50 +0100)]
cookbook: Made callback names more consistent

Changed callback function names so they are more consistent
within this recipe and with other callback names used
in other recipes.

13 years agocookbook: Added simple pointer motion example
Elliot Smith [Thu, 19 Aug 2010 16:17:58 +0000 (17:17 +0100)]
cookbook: Added simple pointer motion example

Added a simple pointer motion example which just reports on
the stage and actor-relative coordinates of the pointer
as it moves.

13 years agocookbook: Added scribble example for pointer motion recipe
Elliot Smith [Thu, 19 Aug 2010 15:53:27 +0000 (16:53 +0100)]
cookbook: Added scribble example for pointer motion recipe

Simple scribbler application which demonstrates tracking
mouse enter and motion events on a texture, drawing with
COGL and ClutterPath as they occur.

13 years agocookbook: Renamed example for pointer crossing
Elliot Smith [Thu, 19 Aug 2010 15:48:59 +0000 (16:48 +0100)]
cookbook: Renamed example for pointer crossing

Decided might be better to cover crossing and motion under
a broader "pointer motion" recipe, so renamed the example
(which only shows pointer crossing event handling).

13 years agocookbook: Added example for pointer cross recipe
Elliot Smith [Thu, 19 Aug 2010 09:32:28 +0000 (10:32 +0100)]
cookbook: Added example for pointer cross recipe

Code example demonstrates detecting pointers entering/leaving
an actor by implementing a (very) simple button with hover
effect.

13 years agodebug: Add a macro for checking debug flags
Emmanuele Bassi [Thu, 19 Aug 2010 12:57:10 +0000 (13:57 +0100)]
debug: Add a macro for checking debug flags

13 years agoclick-action: Add a method to force a release
Emmanuele Bassi [Thu, 19 Aug 2010 11:10:43 +0000 (12:10 +0100)]
click-action: Add a method to force a release

It can be useful to be able to forcibly break the grab set up by the
ClickAction. The newly added release() method provides a mechanism to
release the grab and unset the :held state of the ClickAction.

13 years agoclick-action: Add attribution
Emmanuele Bassi [Thu, 19 Aug 2010 10:26:51 +0000 (11:26 +0100)]
click-action: Add attribution

The ClickAction semantics were inspired by the StClickable widget in the
GNOME Shell Toolkit (St).

13 years agodocs: Clarifies that queue_redraw also applies to picking
Robert Bragg [Wed, 18 Aug 2010 17:06:35 +0000 (18:06 +0100)]
docs: Clarifies that queue_redraw also applies to picking

This clarifies the documentation for clutter_actor_queue_redraw to
explain that custom actors should call this whenever some private state
changes that affects painting *or* picking.

13 years agoclutter-texture: queue redraw when changing pick_with_alpha
Robert Bragg [Wed, 18 Aug 2010 17:05:15 +0000 (18:05 +0100)]
clutter-texture: queue redraw when changing pick_with_alpha

The expectation is that actors should call clutter_actor_queue_redraw
when ever some private state changes that affects painting *or* picking.
ClutterTexture was not doing this for pick_with_alpha property changes.

13 years agoCache a full pick render if we have a static stage
Robert Bragg [Wed, 18 Aug 2010 15:48:55 +0000 (16:48 +0100)]
Cache a full pick render if we have a static stage

The idea is that if we see multiple picks per frame then that implies
the visible scene has become static. In this case we can promote the
next pick render to be unclipped so we have valid pick values for the
entire stage. Now we can continue to read from this cached buffer until
the stage contents do visibly change.

Thanks to Luca Bruno on #clutter for this idea!

13 years agoactor: Ignore paint() on actors being destroyed
Emmanuele Bassi [Wed, 18 Aug 2010 17:20:16 +0000 (18:20 +0100)]
actor: Ignore paint() on actors being destroyed

OBVIOUS OPTIMIZATION IS OBVIOUS

13 years agodocs: Improve paint() documentation
Emmanuele Bassi [Wed, 18 Aug 2010 17:20:04 +0000 (18:20 +0100)]
docs: Improve paint() documentation

13 years agocookbook: Use GdkPixbuf instead of getting data from a texture
Elliot Smith [Wed, 18 Aug 2010 15:02:51 +0000 (16:02 +0100)]
cookbook: Use GdkPixbuf instead of getting data from a texture

Rewrote example for single texture + COGL to use
a GdkPixbuf to load images, rather than reading data
out of another CoglTexture.

The data is then loaded from the pixbuf to a region of
the CoglTexture (as before).

13 years agocookbook: Added a recipe for cross-fading between two images
Elliot Smith [Wed, 18 Aug 2010 10:41:10 +0000 (11:41 +0100)]
cookbook: Added a recipe for cross-fading between two images

The recipe covers a two texture approach (using the Clutter API)
and a single texture approach (using COGL).

It also discusses issues with cross-fading between images of
different sizes with the COGL API, and gives a longer
example of cycling through multiple images in a slideshow
application.

13 years agocookbook: Modified COGL example for consistency
Elliot Smith [Tue, 17 Aug 2010 14:47:59 +0000 (15:47 +0100)]
cookbook: Modified COGL example for consistency

Changed the stage size so the COGL API example for cross-fade
has a stage the same size as the two texture example.

13 years agocookbook: Added video of two texture cross-fade
Elliot Smith [Tue, 17 Aug 2010 14:46:48 +0000 (15:46 +0100)]
cookbook: Added video of two texture cross-fade

Added a video showing the two texture cross-fade.

Modified the example code to animate on key press, so
this video could be captured.

Also altered the stage size to minimise the video size.

13 years agocookbook: Removed unused constant
Elliot Smith [Tue, 17 Aug 2010 13:54:32 +0000 (14:54 +0100)]
cookbook: Removed unused constant

13 years agocookbook: Renamed front/back to top/bottom in cross-fade example
Elliot Smith [Tue, 17 Aug 2010 10:51:33 +0000 (11:51 +0100)]
cookbook: Renamed front/back to top/bottom in cross-fade example

Front/back seems like the wrong terminology when discussing
actors arranged in layers. Top/bottom fits better with Clutter
API function names and other recipes, so renamed variables.

13 years agocookbook: Don't need to set keep-aspect-ratio for simple example
Elliot Smith [Tue, 17 Aug 2010 10:20:20 +0000 (11:20 +0100)]
cookbook: Don't need to set keep-aspect-ratio for simple example

13 years agocookbook: Modified ordering of statements in cross-fade example
Elliot Smith [Tue, 17 Aug 2010 09:56:06 +0000 (10:56 +0100)]
cookbook: Modified ordering of statements in cross-fade example

Changed the order of statements in the sample code to match
the order they will be explained in the walk-through in the recipe.

13 years agocookbook: Added a longer slideshow example
Elliot Smith [Mon, 16 Aug 2010 15:39:13 +0000 (16:39 +0100)]
cookbook: Added a longer slideshow example

Cross-fading between two images is straightforward,
but cycling between more than two is more efficient
if done by copying COGL textures between the
two textures, rather than trying to reposition the
textures.

The example demonstrates how to reuse a pair of
textures to cycle through multiple images.

13 years agocookbook: Made code examples more consistent
Elliot Smith [Mon, 16 Aug 2010 15:16:07 +0000 (16:16 +0100)]
cookbook: Made code examples more consistent

Modified the code example for the Clutter API version
of the cross-fade to use the same command line
as the COGL version.

This also simplifies the explanation in the recipe.

Also made the COGL code sample more consistent with
the Clutter API code sample.

13 years agocookbook: Added example code for texture cross-fading
Elliot Smith [Thu, 12 Aug 2010 16:39:59 +0000 (17:39 +0100)]
cookbook: Added example code for texture cross-fading

Added simple image viewer which loads image file names
from a directory, displays the first one, then displays
the next in the list with each key press. Uses the
primitive fade front in/fade back out approach.

Also adapted Emmanuele's example code which uses Cogl
to produce a similar effect, but within a single texture.
This code loads two images specified on the command
line and cross-fades between them.

13 years agoPost-release version bump to 1.3.13
Emmanuele Bassi [Mon, 16 Aug 2010 12:37:57 +0000 (13:37 +0100)]
Post-release version bump to 1.3.13

13 years agoRelease Clutter 1.3.12 (developers snapshot)
Emmanuele Bassi [Mon, 16 Aug 2010 12:23:43 +0000 (13:23 +0100)]
Release Clutter 1.3.12 (developers snapshot)

13 years agodocs: Fixes to avoid gtk-doc warnings
Emmanuele Bassi [Tue, 17 Aug 2010 13:54:20 +0000 (14:54 +0100)]
docs: Fixes to avoid gtk-doc warnings

13 years agobuild: Remove dolt remnants
Emmanuele Bassi [Tue, 17 Aug 2010 10:34:35 +0000 (11:34 +0100)]
build: Remove dolt remnants

We don't use Dolt any more, since we depend on libtool 2.2.

13 years agodocs: Add :keep-aspect-ratio behaviour to the notes
Emmanuele Bassi [Mon, 16 Aug 2010 15:33:32 +0000 (16:33 +0100)]
docs: Add :keep-aspect-ratio behaviour to the notes

13 years agotexture: Default square textures to height-for-width
Emmanuele Bassi [Mon, 16 Aug 2010 14:56:49 +0000 (15:56 +0100)]
texture: Default square textures to height-for-width

Square textures should have a preferred geometry request set to
height-for-width, as it is the default for Clutter itself.

13 years agoPost-release version bump to 1.3.13
Emmanuele Bassi [Mon, 16 Aug 2010 12:37:57 +0000 (13:37 +0100)]
Post-release version bump to 1.3.13

13 years agoRelease Clutter 1.3.12 (developers snapshot)
Emmanuele Bassi [Mon, 16 Aug 2010 12:23:43 +0000 (13:23 +0100)]
Release Clutter 1.3.12 (developers snapshot)

13 years agobuild: Fix distcheck errors
Emmanuele Bassi [Mon, 16 Aug 2010 12:23:10 +0000 (13:23 +0100)]
build: Fix distcheck errors

13 years agobuild: Use maintainer-clean for the ignore files removal
Emmanuele Bassi [Sun, 15 Aug 2010 17:42:54 +0000 (18:42 +0100)]
build: Use maintainer-clean for the ignore files removal

Instead of distclean.

13 years agoRevert "build: Distclean generated ignore files"
Emmanuele Bassi [Sun, 15 Aug 2010 17:33:10 +0000 (18:33 +0100)]
Revert "build: Distclean generated ignore files"

Git ignore files are not dist'ed, so it's pointless to remove them on
distclean.

This reverts commit f14587aadc428e5743d2b30e2a9f4bf51f1d1e05.

13 years agobuild: Rule for quick publishing of the cookbook
Emmanuele Bassi [Sat, 14 Aug 2010 07:53:18 +0000 (08:53 +0100)]
build: Rule for quick publishing of the cookbook

Just call `make publish`.

13 years agobuild: Autogenerate more ignore files
Emmanuele Bassi [Sat, 14 Aug 2010 07:43:16 +0000 (08:43 +0100)]
build: Autogenerate more ignore files

The tests/accessibility, tests/micro-bench and the examples directory
in the coobook create a lot of non-installed binaries. Since we know who
they are, and we ignore them, we can auto-generate the ignore files as
well.

The rest of Clutter is covered by the main ignore file.

13 years agobuild: Distclean generated ignore files
Emmanuele Bassi [Fri, 13 Aug 2010 17:35:35 +0000 (18:35 +0100)]
build: Distclean generated ignore files

13 years agobuild: Make test-conform depend on Makefile changes
Emmanuele Bassi [Fri, 13 Aug 2010 17:32:10 +0000 (18:32 +0100)]
build: Make test-conform depend on Makefile changes

13 years agobuild: Autogenerate interactive/.gitignore
Emmanuele Bassi [Fri, 13 Aug 2010 17:31:44 +0000 (18:31 +0100)]
build: Autogenerate interactive/.gitignore

Exactly like we did for conform/.gitignore

13 years agobuild: Generate the conformance/.gitignore file
Emmanuele Bassi [Fri, 13 Aug 2010 17:22:12 +0000 (18:22 +0100)]
build: Generate the conformance/.gitignore file

Since we are generating a lot of files that we should ignore, we should
generate the Git ignore file as well.

13 years agobuild: Split up the test-conformance SOURCES
Emmanuele Bassi [Fri, 13 Aug 2010 17:15:01 +0000 (18:15 +0100)]
build: Split up the test-conformance SOURCES

Having different sections should make it easier to add new test units to
the build.

13 years agoclutter.modules: Remove deps on gir-repository
Emmanuele Bassi [Fri, 13 Aug 2010 17:14:10 +0000 (18:14 +0100)]
clutter.modules: Remove deps on gir-repository

Keep it in the moduleset, but don't let Clutter depend on it.

13 years agoRevert "clutter.modules: Remove deps on gir-repository"
Emmanuele Bassi [Fri, 13 Aug 2010 17:12:43 +0000 (18:12 +0100)]
Revert "clutter.modules: Remove deps on gir-repository"

This reverts commit 0ce9cf730b2a8c3b3ac4786afee0579a3795fd9e.

The commit contained unrelated changes

13 years agoclutter.modules: Remove deps on gir-repository
Emmanuele Bassi [Fri, 13 Aug 2010 17:09:28 +0000 (18:09 +0100)]
clutter.modules: Remove deps on gir-repository

Keep it in the moduleset, but don't let Clutter depend on it.

13 years agoclutter.modules: Add a gtk2 module for gtk+ 2.x
Emmanuele Bassi [Fri, 13 Aug 2010 17:00:23 +0000 (18:00 +0100)]
clutter.modules: Add a gtk2 module for gtk+ 2.x

Mx (and others) depend on gtk+ 2.x, and not on gtk+ 3.x.

13 years agoanimator: Plug some leaks
Emmanuele Bassi [Fri, 13 Aug 2010 15:32:27 +0000 (16:32 +0100)]
animator: Plug some leaks

13 years agomaterial: Implements weak materials
Robert Bragg [Mon, 9 Aug 2010 15:01:17 +0000 (16:01 +0100)]
material: Implements weak materials

Weak materials are ones that don't take a reference on their parent and
they are associated with a callback that notifies when the material is
destroyed, because its parent was freed or modified.

More details can be found at:
http://wiki.clutter-project.org/wiki/CoglDesign/CoglMaterial

For now the concept is internal only but the plan is to make this public
at some point once we have tested the design internally.

13 years agostate: Plug some memory leakage
Emmanuele Bassi [Fri, 13 Aug 2010 11:12:59 +0000 (12:12 +0100)]
state: Plug some memory leakage

Thanks to Valgrind, test-state-base now reports 0 bytes definitely lost.

13 years agoMerge remote branch 'elliot/cookbook-events-mouse-scroll'
Emmanuele Bassi [Thu, 12 Aug 2010 17:29:08 +0000 (18:29 +0100)]
Merge remote branch 'elliot/cookbook-events-mouse-scroll'

* elliot/cookbook-events-mouse-scroll:
  cookbook: Cleaning up grammar and wording in mouse scroll recipe
  cookbook: Added more explanation about setting y coord on scrollable
  cookbook: Mentioned the animation in the sample code
  cookbook: Included video of the scroll example running
  cookbook: Made stage slightly smaller for scroll event example
  cookbook: Added video showing scrollable actor
  cookbook: Added walk through of code example for mouse scroll
  cookbook: Fixed link to example in mouse scroll recipe
  cookbook: Simplified full scroll example
  cookbook: Improved wording and formatting in mouse scroll intro.
  cookbook: Handle all possible mouse scroll directions
  cookbook: Build mouse scroll example with cookbook
  cookbook: Cleaned up redundant comments in code example
  cookbook: Added xmlns for XInclude to events docbook file
  cookbook: Added basic mouse scroll recipe

13 years agodocs: Update the build instructions in the reference
Neil Roberts [Thu, 12 Aug 2010 16:03:16 +0000 (17:03 +0100)]
docs: Update the build instructions in the reference

This removes all references to SDL in the build instructions as the
backend is no longer available.  The OpenGL version required is only
1.2 not 1.4. The Windows build instructions were out of date and have
been replaced with a link to the wiki instead.

13 years agoRemove last uses of cogl_program_uniform*
Emmanuele Bassi [Thu, 12 Aug 2010 16:06:29 +0000 (17:06 +0100)]
Remove last uses of cogl_program_uniform*

Following the commits:

  c03544da - clutter-shader: use cogl_program_set_uniform_xyz API
  a26119b5 - tests: Remove use of cogl_program_use

Remove the users of cogl_program_uniform_* and cogl_program_use() in the
shader-based effects.

13 years agobuild/mingw/README: Replace with a link to the wiki
Neil Roberts [Thu, 12 Aug 2010 15:56:28 +0000 (16:56 +0100)]
build/mingw/README: Replace with a link to the wiki

The build instructions for MinGW have been moved to the wiki.

13 years agocogl-shader: get_info_log should always use strdup
Robert Bragg [Thu, 12 Aug 2010 09:43:22 +0000 (10:43 +0100)]
cogl-shader: get_info_log should always use strdup

In the case where there is no error log for arbfp we were returning a
"" string literal. The other paths were using g_strdup to return a
string that could be freed with g_free. This makes the arbfp path return
g_strdup ("") instead.

13 years agocogl-shader: correctly #ifdef guard an if else block
Robert Bragg [Thu, 12 Aug 2010 09:40:39 +0000 (10:40 +0100)]
cogl-shader: correctly #ifdef guard an if else block

There are quite a few if {} else {} blocks for dealing with arbfp else
glsl and the first block is guarded with #ifdef HAVE_COGL_GL. In this
case though the #endif was before the else so it wouldn't compile for
gles.

13 years agomaterial-glsl: #include "cogl-shader-private.h"
Robert Bragg [Thu, 12 Aug 2010 09:37:55 +0000 (10:37 +0100)]
material-glsl: #include "cogl-shader-private.h"

We need to include cogl-shader-private.h to have the
COGL_SHADER_TYPE_GLSL define. When building for opengl this wasn't
noticed probably because some other header indirectly includes this
file. It was a problem when building for gles2 though.

13 years agotests: Remove use of cogl_program_use
Robert Bragg [Wed, 11 Aug 2010 18:39:41 +0000 (19:39 +0100)]
tests: Remove use of cogl_program_use

The removes the use of cogl_program_use which has been deprecated and
instead of using the cogl_program_uniform functions we now use the
cogl_program_set_uniform methods.

13 years agoclutter-shader: use cogl_program_set_uniform_xyz API
Robert Bragg [Wed, 11 Aug 2010 18:32:09 +0000 (19:32 +0100)]
clutter-shader: use cogl_program_set_uniform_xyz API

Instead of using the deprecated cogl_program_uniform_xyz functions we
now use the cogl_program_set_uniform methods. It looks like this should
also fix a problem with clutter-shader too in that previously we weren't
calling cogl_program_use before cogl_program_uniform_xyz so setting
uniforms would only work while the shader is enabled.

13 years agocogl-program: Adds use_uniform_xyz methods
Robert Bragg [Wed, 11 Aug 2010 18:18:14 +0000 (19:18 +0100)]
cogl-program: Adds use_uniform_xyz methods

Instead of exposing an API that provides an OpenGL state machine style
where you first have to bind the program to the context using
cogl_program_use() followed by updating uniforms using
cogl_program_uniform_xyz we now have uniform setter methods that take an
explicit CoglHandle for the program.

This deprecates cogl_program_use and all the cogl_program_uniform
variants and provides the following replacements:
    cogl_program_set_uniform_1i
    cogl_program_set_uniform_1f
    cogl_program_set_uniform_int
    cogl_program_set_uniform_float
    cogl_program_set_uniform_matrix

13 years agointrospection: Use the --quiet flag conditionally
Damien Lespiau [Thu, 12 Aug 2010 14:36:04 +0000 (10:36 -0400)]
introspection: Use the --quiet flag conditionally

--quiet has been added to g-ir-scanner in the 0.9.1 cycle. We really
want to be able to compile clutter with 0.6.14 to be able to reuse
gir files that are distributed in current distributions.

Use the INTROSPECTION_SCANNER_ARGS (previously unused) variable to
convey --quiet when necessary.

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

13 years agoclutter.modules: cluttersmith depends on gjs and clutter-gtk
Neil Roberts [Thu, 12 Aug 2010 13:59:03 +0000 (14:59 +0100)]
clutter.modules: cluttersmith depends on gjs and clutter-gtk

This adds dependencies on gjs and clutter-gtk to cluttersmith. There
was no module listed for gjs so this is added from the jhbuild gnome
module list.

13 years agoRemove test-random-text from the interactive .gitignore
Neil Roberts [Thu, 12 Aug 2010 13:37:27 +0000 (14:37 +0100)]
Remove test-random-text from the interactive .gitignore

13 years agoUpdate the micro-bench Git ignore file
Emmanuele Bassi [Thu, 12 Aug 2010 12:48:35 +0000 (13:48 +0100)]
Update the micro-bench Git ignore file

13 years agobuild: Add simple scripts for setting up jhbuild
Emmanuele Bassi [Thu, 12 Aug 2010 12:46:58 +0000 (13:46 +0100)]
build: Add simple scripts for setting up jhbuild

Use the same script also used by gnome-shell to set up the system
dependencies for building Clutter (and its dependencies) using jhbuild.

13 years agocookbook: Cleaning up grammar and wording in mouse scroll recipe
Elliot Smith [Thu, 12 Aug 2010 09:16:56 +0000 (10:16 +0100)]
cookbook: Cleaning up grammar and wording in mouse scroll recipe

13 years agocogl-atlas: Verify that the chosen initial size is supported
Neil Roberts [Thu, 12 Aug 2010 08:59:58 +0000 (09:59 +0100)]
cogl-atlas: Verify that the chosen initial size is supported

CoglAtlas chooses a fairly large default initial size of either
512x512 or 1024x1024 depending on the texture format. There is a
chance that this size will not be supported on some platforms which
would be catastrophic for the glyph cache because it would mean that
it would always fail to put any glyphs in the cache so text wouldn't
work. To fix this the atlas code now checks whether the chosen initial
size is supported by the texture driver and if not it will get halved
until it is supported.

13 years agocogl-atlas: Use _cogl_texture_driver_size_supported
Neil Roberts [Thu, 12 Aug 2010 08:08:30 +0000 (09:08 +0100)]
cogl-atlas: Use _cogl_texture_driver_size_supported

Previously when creating a new rectangle map it would try increasingly
larger texture sizes until GL_MAX_TEXTURE_SIZE is reached. This is bad
because it queries state which should really be owned by the texture
driver. Also GL_MAX_TEXTURE_SIZE is often a conservative estimate so
larger texture sizes can be used if the proxy texture is queried
instead.

13 years agocogl-rectangle-map: Record largest gap rather than the remaining space
Neil Roberts [Wed, 11 Aug 2010 14:08:00 +0000 (15:08 +0100)]
cogl-rectangle-map: Record largest gap rather than the remaining space

Previously each node in the rectangle map tree would store the total
remaining space in all of its children to use as an optimization when
adding nodes. With this it could skip an entire branch of the tree if
it knew there could never be enough space for the new node in the
branch. This modifies that slightly to instead store the largest
single gap. This allows it to skip a branch earlier because often
there would be a lot of small gaps which would add up to enough a
space for the new rectangle, but the space can't be used unless it is
in a single node.

The rectangle map still needs to keep track of the total remaining
space for the whole map for the debugging output so this has been
added back in to the CoglRectangleMap struct. There is a separate
debugging function to verify this value.

13 years agocogl-atlas: Try the next size when there would be less than 6% waste
Neil Roberts [Fri, 6 Aug 2010 17:42:43 +0000 (18:42 +0100)]
cogl-atlas: Try the next size when there would be less than 6% waste

Previously when the atlas needs to be migrated it would start by
trying with the same size as the existing atlas if there is enough
space for the new texture. However even if the atlas is completely
sorted there will always be some amount of waste so when the atlas
needs to grow it would usually end up redundantly trying the same size
when it is very unlikely to fit. This patch changes it so that there
must be at least 6% waste available after the new texture is added
otherwise it will start with the next atlas size.

13 years agocogl-atlas: Add some more debugging notes
Neil Roberts [Fri, 6 Aug 2010 17:42:01 +0000 (18:42 +0100)]
cogl-atlas: Add some more debugging notes

This adds some debugging notes which report when the atlas is trying
various sizes.

13 years agocogl-rectangle-map: Use a GArray for the stack
Neil Roberts [Fri, 6 Aug 2010 16:40:52 +0000 (17:40 +0100)]
cogl-rectangle-map: Use a GArray for the stack

When iterating over the rectangle map a stack is used to implement a
recursive algorithm. Previously this was slice allocating a linked
list. Now it uses a GArray which is retained with the rectangle map to
avoid frequent allocations which is a little bit faster.

13 years agocogl-rectangle-map: Store the remaining space per node
Neil Roberts [Fri, 6 Aug 2010 15:13:20 +0000 (16:13 +0100)]
cogl-rectangle-map: Store the remaining space per node

Previously the remaining space was managed as part of the
CoglRectangleMap struct. Now it is stored per node so that at any
point in the hierarchy we can quickly determine how much space is
remaining in all of the node's children. That way when adding a
rectangle we can miss out entire branches more quickly if we know that
there is no way the new rectangle would fit in that branch.

This also adds a function to recursively verify the cached state in
the nodes such as the remaining space and the number of
rectangles. This function is only called when the dump-atlas-image
debug flag is set because it is potentially quite slow.

13 years agocogl-atlas: Increase the default minimum texture size
Neil Roberts [Fri, 6 Aug 2010 10:44:39 +0000 (11:44 +0100)]
cogl-atlas: Increase the default minimum texture size

When initially creating a texture it would start with a minimum size
of 256x256. This increases the size so that it would try to match 1MB
of memory.

13 years agocogl-pango: Use a CoglAtlas to maintain the glyph cache
Neil Roberts [Wed, 4 Aug 2010 17:05:21 +0000 (18:05 +0100)]
cogl-pango: Use a CoglAtlas to maintain the glyph cache

The glyph cache is now stored in a CoglAtlas structure instead of the
custom atlasing code. This has the advantage that it can share code
with the main texture atlas and that it supports reorganizing the
atlas when it becomes full. Unlike the texture atlas, the glyph cache
can use multiple atlases which would be neccessary if the maximum
texture size is reached and we need to create a second
texture. Whenever a display list is created it now has to register a
callback with the glyph cache so that the display list can be
recreated whenever any of the atlases are reorganized. This is needed
because the display list directly stores texture coordinates within
the atlas texture and they would become invalid when the texture is
moved.

The ensure_glyphs_for_layout now works in two steps. First it reserves
space in the atlas for all of the glyphs. The atlas is created with
the DISABLE_MIGRATION flag so that it won't actually copy any textures
if any rearranging is needed. Whenever the position is updated for a
glyph then it is marked as dirty. After space for all of the glyphs
has been reserved it will iterate over all dirty glyphs and redraw
them using Cairo. The rendered glyph is then stored in the texture
with a sub texture update.

The glyphs need to all be set at the right location before starting to
create the display list because the display list stores the texture
coordinates of the glyph. If any of the glyphs were moved around then
the parts of the display list that was created already would become
invalid. To make this work, ensure_glyphs_for_layout is now always
called before rendering a layout or a layout line.

13 years agocogl-atlas: Support multiple formats and clearing the texture
Neil Roberts [Thu, 5 Aug 2010 12:24:02 +0000 (13:24 +0100)]
cogl-atlas: Support multiple formats and clearing the texture

_cogl_atlas_new now has two extra parameters to specify the format of
the textures it creates as well as a set of flags to modify the
behavious of the atlas. One of the flags causes the new textures to be
cleared and the other causes migration to avoid actually copying the
textures. This is needed to use CoglAtlas from the pango glyph cache
because it needs to use COGL_PIXEL_A_8 and to clear the textures as it
does not fill in the gaps between glyphs. It needs to avoid copying
the textures so that it can work on GL implementations without FBO
support.

13 years agocogl-atlas-texture: Split out the atlas data structure
Neil Roberts [Mon, 2 Aug 2010 15:29:10 +0000 (16:29 +0100)]
cogl-atlas-texture: Split out the atlas data structure

Instead of storing a pointer to the CoglRectangleMap and a handle to
the atlas texture in the context, there is a now a separate data
structure called a CoglAtlas to manage these two. The context just
contains a pointer to this. The code to reorganise the atlas has been
moved from cogl-atlas-texture.c to cogl-atlas.c

13 years agocogl: Add an internal utility to maintain a list of callback functions
Neil Roberts [Wed, 4 Aug 2010 16:59:06 +0000 (17:59 +0100)]
cogl: Add an internal utility to maintain a list of callback functions

This adds an internal CoglCallbackList type which is just a GSList of
of function pointers along with a data pointer to form a
closure. There are functions to add and remove items and to invoke the
list of functions. This could be used in a number of places in Cogl.

13 years agocogl-atlas: Rename to CoglRectangleMap
Neil Roberts [Mon, 2 Aug 2010 14:24:03 +0000 (15:24 +0100)]
cogl-atlas: Rename to CoglRectangleMap

This simply renames CoglAtlas to CoglRectangleMap without making any
functional changes. The old 'CoglAtlas' is just a data structure for
managing unused areas of a rectangle and it doesn't neccessarily have
to be used for an atlas so it wasn't a very good name.

13 years agotest-random-text: Convert to a micro-benchmark
Neil Roberts [Thu, 5 Aug 2010 16:54:18 +0000 (17:54 +0100)]
test-random-text: Convert to a micro-benchmark

test-random-text is moved to the micro-bench directory. It now prints
out the time taken to draw every 10 frames.

13 years agotest-text-perf: Add a wider range of characters
Neil Roberts [Thu, 5 Aug 2010 16:27:23 +0000 (17:27 +0100)]
test-text-perf: Add a wider range of characters

Instead of just using the latin alphabet, this adds digits and some
other alphabets to increase the range of glyphs used.

13 years agotest-text-perf: Scale the text if the settings will not fit
Neil Roberts [Thu, 5 Aug 2010 16:06:45 +0000 (17:06 +0100)]
test-text-perf: Scale the text if the settings will not fit

If the font size or the number of characters causes the label not to
fit on the stage, instead of aborting it will now scale the labels so
that it fits within one of the dimensions. This makes it easier to
test with large glyph sizes.

13 years agocogl-material: Compare whether textures are equal by their GL handle
Neil Roberts [Thu, 12 Aug 2010 08:11:28 +0000 (09:11 +0100)]
cogl-material: Compare whether textures are equal by their GL handle

Textures within a layer were compared for equality by comparing their
texture handle. However this means that sub textures and atlas
textures which may be internally using the same GL handle would not be
batched together. Instead it now tries to determine the underlying GL
handle using either the slice override or _cogl_texture_get_gl_texture
and then compares those.

13 years agocookbook: Added more explanation about setting y coord on scrollable
Elliot Smith [Thu, 12 Aug 2010 09:05:27 +0000 (10:05 +0100)]
cookbook: Added more explanation about setting y coord on scrollable

Added some extra explanation, referencing the sample code, to
try to make the scrollable actor example easier to follow. Basically
demonstrates the principles described in the paragraph about
setting the y coordinate for the scrollable actor, but using actual
numbers.

13 years agocogl-atlas-texture: Accept formats with different component orders
Neil Roberts [Wed, 5 May 2010 15:45:21 +0000 (16:45 +0100)]
cogl-atlas-texture: Accept formats with different component orders

When filtering on allowed formats for atlas textures, it now masks out
the BGR and AFIRST bits in addition to the premult bit. That way it
will accept RGB and RGBA formats in any component order.

In theory it could also accept luminance and alpha-only textures but I
haven't added this because presumably if the application has requested
these formats then it has some reason not to use a full RGB or RGBA
texture and we should respect that.

13 years agobuild: Make the introspection generation quiet (again)
Emmanuele Bassi [Thu, 12 Aug 2010 08:03:58 +0000 (09:03 +0100)]
build: Make the introspection generation quiet (again)

13 years agodrag-action: Capture ENTER when dragging
Emmanuele Bassi [Thu, 12 Aug 2010 07:53:06 +0000 (08:53 +0100)]
drag-action: Capture ENTER when dragging

This completes commit 9ab83cebf.

13 years agocookbook: Mentioned the animation in the sample code
Elliot Smith [Wed, 11 Aug 2010 16:14:09 +0000 (17:14 +0100)]
cookbook: Mentioned the animation in the sample code

Put in comments to make it clear where the animation
for the mouse scroll is coming from in the sample code.

13 years agocookbook: Included video of the scroll example running
Elliot Smith [Wed, 11 Aug 2010 16:12:42 +0000 (17:12 +0100)]
cookbook: Included video of the scroll example running

Inlined the video of the mouse scroll example code running
to the docbook file for events.

13 years agocookbook: Made stage slightly smaller for scroll event example
Elliot Smith [Wed, 11 Aug 2010 16:11:29 +0000 (17:11 +0100)]
cookbook: Made stage slightly smaller for scroll event example

Reduced the size of the stage to make for a smaller video.