profile/ivi/clutter.git
14 years agostage: Add :key-focus property
Emmanuele Bassi [Mon, 1 Feb 2010 11:04:59 +0000 (11:04 +0000)]
stage: Add :key-focus property

ClutterStage has both set_key_focus() and get_key_focus() methods, but
there is no :key-focus property. This means that it is not possible to
get notifications when the key-focus has changes except by connecting to
both the ::key-focus-in and ::key-focus-out signals and do additional
bookkeeping.

http://bugzilla.openedhand.com/show_bug.cgi?id=1956

Signed-off-by: Emmanuele Bassi <ebassi@linux.intel.com>
14 years agodocs: Update the README
Emmanuele Bassi [Fri, 29 Jan 2010 10:13:57 +0000 (10:13 +0000)]
docs: Update the README

Clean up the grammar and some wrinkles in the text.

14 years agodocs: Update the configure switches in the README
Emmanuele Bassi [Fri, 29 Jan 2010 09:31:13 +0000 (09:31 +0000)]
docs: Update the configure switches in the README

14 years agobuild: Warn with --disable-conformance and --enable-gcov
Emmanuele Bassi [Fri, 29 Jan 2010 09:29:53 +0000 (09:29 +0000)]
build: Warn with --disable-conformance and --enable-gcov

When building Clutter without conformance test suite we ought to warn
the user that the coverage report is not going to be accurate.

14 years agoRemove tabs from configure.ac
Emmanuele Bassi [Fri, 29 Jan 2010 09:29:37 +0000 (09:29 +0000)]
Remove tabs from configure.ac

14 years agobuild: Allow disabling the conformance test suite
Emmanuele Bassi [Fri, 29 Jan 2010 09:26:47 +0000 (09:26 +0000)]
build: Allow disabling the conformance test suite

When building Clutter for packaging on headless boxes it's pointless to
allow building the conformance test to be built (and run on 'make
check').

14 years agoWhitespace fixes in cogl-util
Emmanuele Bassi [Wed, 27 Jan 2010 21:26:26 +0000 (21:26 +0000)]
Whitespace fixes in cogl-util

14 years agoWhitespace fixes
Emmanuele Bassi [Wed, 27 Jan 2010 21:16:28 +0000 (21:16 +0000)]
Whitespace fixes

14 years agodocs: Fixes for TimeoutPool and Frame sources
Emmanuele Bassi [Wed, 27 Jan 2010 21:14:43 +0000 (21:14 +0000)]
docs: Fixes for TimeoutPool and Frame sources

The TimeoutPool is not used by ClutterTimeline any more, so we need to
remove a sentence from its description. We also need to fix the gtk-doc
syntax errors.

14 years agocogl: Use the colours of COGL_DEBUG=rectangles to debug batching
Neil Roberts [Fri, 22 Jan 2010 18:14:57 +0000 (18:14 +0000)]
cogl: Use the colours of COGL_DEBUG=rectangles to debug batching

Instead of assigning a new colour to each quad of a batch, the
rectangle debugging code now assigns a new colour to each batch so
that it can be used to visually see what is being batched. The colour
is stored in a global variable that is reset during cogl_clear. This
improves the chances that the same colour will be used for a batch in
the next frames to avoid flickering.

14 years agocogl-vertex-buffer: Fix disabling the texture arrays from previous prim
Neil Roberts [Tue, 26 Jan 2010 13:46:27 +0000 (13:46 +0000)]
cogl-vertex-buffer: Fix disabling the texture arrays from previous prim

When setting up the state for the vertex buffer,
enable_state_for_drawing_buffer tries to keep track of the highest
numbered texture unit in use. It then disables any texture arrays for
units that were previously enabled if they are greater than that
number. However if there is no texturing in the VBO then the max used
unit would be left at 0 which it would later think meant unit 0 is
still in use so it wouldn't disable it. To fix this it now initialises
the max used unit to -1 which it should interpret as ‘no units are in
use’ so it will later disable the arrays for all units.

Thanks to Jon Mayo for reporting the bug.

http://bugzilla.openedhand.com/show_bug.cgi?id=1957

14 years agodocs: Add some notes about the CoglPixelFormat enums
Neil Roberts [Wed, 27 Jan 2010 12:06:22 +0000 (12:06 +0000)]
docs: Add some notes about the CoglPixelFormat enums

The pixel format enums didn't explain what order in memory the
components should be so it was difficult to use them.

14 years agodocs: Fix some of the examples for the animation docs
Neil Roberts [Wed, 27 Jan 2010 11:02:34 +0000 (11:02 +0000)]
docs: Fix some of the examples for the animation docs

In the example for clutter_actor_animate the "x" and "y" properties
are floats so they need to be passed float values in the var args
otherwise it will crash. There was also a missing comma.

There were some other minor problems with the behaviours example which
would cause it not to compile.

14 years agocogl: Fix checks of the number of available texture units
Damien Lespiau [Tue, 26 Jan 2010 18:47:25 +0000 (18:47 +0000)]
cogl: Fix checks of the number of available texture units

We were checking the number of texture units against the GL enum that is
used in glGetInteger() to query that number. Let's abstract this in a
little function.

Took the opportunity to dig a bit on the usage of GL limits for the
number of texture (image) units and document our use of them. We'll need
something finer grained if we want to fully exploit texture image units
with a programmable pipeline.

14 years agocogl: Fix gl equivalent of blend string
Damien Lespiau [Sun, 15 Nov 2009 20:17:47 +0000 (20:17 +0000)]
cogl: Fix gl equivalent of blend string

An example of what could be the equivalent of
    "RBG = REPLACE(TEXTURE)
     A   = MODULATE(PREVIOUS,TEXTURE)"
using the ARB_texture_env_combine extension was given, but it seems that
a few typo were left:
    * remove a spurius GL_COMBINE_ALPHA
    * use the _ALPHA variant of SRCN and OPERANDN when setting up the
      alpha combiner

14 years agotests: blend-string: use g_assert_cmpint
Damien Lespiau [Wed, 18 Nov 2009 01:13:11 +0000 (01:13 +0000)]
tests: blend-string: use g_assert_cmpint

It's very useful to see the actual number the reference value is
compared too when the test fails. GTest has g_assert_cmp$type()
functions for that, so make good use of them.

14 years agotest-cogl-multitexture: use several materials with texture matrices
Damien Lespiau [Tue, 26 Jan 2010 16:59:50 +0000 (16:59 +0000)]
test-cogl-multitexture: use several materials with texture matrices

A small doubt has risen about the use of CoglTextureUnit in materials:
will texture matrices still work if we have several materials, each of
them having at texture on the same texture unit? The answer is yes!

test-cogl-multitexture has been extended to use 2 materials with about
the same setup except a little difference: the texture matrices for the
lightmaps rotate in opposite directions.

While at it, changed the rotation behaviour by an implicit animation
with a small additional bonus bling.

14 years agocogl: Create CoglTextureUnit with its associated unit number
Damien Lespiau [Sun, 15 Nov 2009 19:54:17 +0000 (19:54 +0000)]
cogl: Create CoglTextureUnit with its associated unit number

The index field of CoglTextureUnit was never set, leading to the
creation of units with index set to 0. When trying to retrieve a texture
unit by its index (!= 0) with _cogl_get_texture_unit(), a new one was
created as it could not find it back in the list of textures units:
ctx->texture_units.

http://bugzilla.openedhand.com/show_bug.cgi?id=1958

14 years agoactor: Use GParamSpecUint for :opacity
Emmanuele Bassi [Thu, 21 Jan 2010 17:41:10 +0000 (17:41 +0000)]
actor: Use GParamSpecUint for :opacity

The :opacity property is defined using a GParamSpecUchar. This usually
leads to issues with language bindings that don't have an 'unsigned
char' type and that need to explicitly handle the conversion between
G_TYPE_UCHAR and G_TYPE_INT or G_TYPE_UINT.

The property definition already specifies an interval size of [0, 255]
on the values; more importantly, GObject already implicitly transforms
between G_TYPE_UCHAR and G_TYPE_UINT (the GValue transformation
functions are registered at type system initialization time) so
switching between a GParamSpecUchar and a GParamSpecUint should not be
an ABI break.

I have tested a simple program using the opacity property before and
after the change and I cannot see any run-time warnings related to this
issue.

14 years agotest-easing: Do not reconnect signals multiple times
Emmanuele Bassi [Fri, 22 Jan 2010 21:44:28 +0000 (21:44 +0000)]
test-easing: Do not reconnect signals multiple times

The test should keep track of the last animation and avoid reconnecting
signals to the same instance in case the -r argument has been passed.

14 years agoanimation: Verify internal state
Emmanuele Bassi [Fri, 22 Jan 2010 21:42:55 +0000 (21:42 +0000)]
animation: Verify internal state

Be more drastic if the internal state is broken, and assert() if the
expected Alpha and Timeline instances we need are not valid. This
usually implies a library bug or a massive heap corruption.

14 years agodocs: Fix the Animation:object property
Emmanuele Bassi [Fri, 22 Jan 2010 21:42:10 +0000 (21:42 +0000)]
docs: Fix the Animation:object property

There is a typo in the Animation:object property gtk-doc declaration.

14 years agoanimation: Add more debug annotations
Emmanuele Bassi [Fri, 22 Jan 2010 21:41:33 +0000 (21:41 +0000)]
animation: Add more debug annotations

We need some better tracking of the Animation's lifetime.

14 years agoanimation: Transform if necessary
Emmanuele Bassi [Fri, 22 Jan 2010 21:36:41 +0000 (21:36 +0000)]
animation: Transform if necessary

The Animation code does transformation of values between type A and A'
after checking for compatibility using g_value_type_compatible(). This
is incorrect: compatibility means that the two types can be copied. The
correct conversion should follow:

        if (compatible (type (A), type (A')))
          copy (A, A');
        else
          if (transformable (type (A), type (A')))
            transform (A, A');
          else
            error("Unable to trasform type A in A'");

The transformation might still fail, so we need to check for errors
there as well as a fall-through case.

14 years agoanimation: Check for value transformability
Emmanuele Bassi [Fri, 22 Jan 2010 21:33:28 +0000 (21:33 +0000)]
animation: Check for value transformability

We should not just check for compatibility, but also for the ability to
transform a GValue of type A into another of type A'.

Usually compatibility is enough, especially if types can be
introspected beforehand; some times, though, we also need to check for
transformability as a type can provide the transformation functions
necessary for the operation.

14 years agobuild: Use no-define
Emmanuele Bassi [Fri, 22 Jan 2010 00:06:17 +0000 (00:06 +0000)]
build: Use no-define

We don't need the PACKAGE and VERSION defines in the config.h.

14 years agobuild: Add no-portability option to automake
Emmanuele Bassi [Thu, 21 Jan 2010 23:57:38 +0000 (23:57 +0000)]
build: Add no-portability option to automake

We require the GNU version of make for some of our rules, and it's been
so for a while now.

14 years agomaster clock: Improve the timeline advancement protection
Emmanuele Bassi [Thu, 21 Jan 2010 23:41:18 +0000 (23:41 +0000)]
master clock: Improve the timeline advancement protection

The commit 1c69c61745ed510f0b6ab16cb963ca01994cb9fc which improved the
protection against timeline removals during the master clock advancement
was only doing half the job - and actually broke the chaining of
animations inside the ::completed signal.

We cannot simply take a reference on the timelines and still use the list
held by the master clock because the do_tick() might result in the
creation of a new timeline, which gets added at the end of the list with
no reference increase and thus gets disposed at the end of the iteration.

We also cannot steal the master clock timelines list because a timeline
might be removed as the direct result of do_tick() and remove_timeline()
would not find the timeline, failing and leaving a dangling pointer
behind.

For this reason we copy the list of timelines out of the one that the
Master Clock holds, take a reference on each timeline, advance them all,
release the reference and free the list.

14 years agowin32: Use an invisible cursor when cursor-visible is FALSE
Neil Roberts [Fri, 15 Jan 2010 22:56:37 +0000 (22:56 +0000)]
win32: Use an invisible cursor when cursor-visible is FALSE

The win32 backend now handles the WM_SETCURSOR message and sets a
fully transparent cursor if the cursor-visible property has been
cleared on the stage. The icon is stored in the library via a resource
file. The instance handle for the DLL is needed to load the resource
so there is now a DllMain function to grab the handle.

14 years agoPost-release version bump to 1.1.7
Neil Roberts [Mon, 18 Jan 2010 17:33:08 +0000 (17:33 +0000)]
Post-release version bump to 1.1.7

14 years agoRelease Clutter 1.1.6
Neil Roberts [Mon, 18 Jan 2010 15:44:58 +0000 (15:44 +0000)]
Release Clutter 1.1.6

14 years agoREADME: Clarify the required OpenGL version
Neil Roberts [Mon, 18 Jan 2010 15:43:25 +0000 (15:43 +0000)]
README: Clarify the required OpenGL version

Cogl will not allow OpenGL 1.2 if it doesn't have the multitexturing
extension so we should make this clear in the README.

14 years agoAdd build/mingw/{README,mingw-cross-compile.sh} to the dist tarball
Neil Roberts [Mon, 18 Jan 2010 13:56:56 +0000 (13:56 +0000)]
Add build/mingw/{README,mingw-cross-compile.sh} to the dist tarball

It's quite difficult to get git working on Windows so it makes sense
to put the build instructions somewhere accessible.

14 years agotest-texture-fbo: Disconnect the paint handler for the stage
Neil Roberts [Mon, 18 Jan 2010 12:42:20 +0000 (12:42 +0000)]
test-texture-fbo: Disconnect the paint handler for the stage

Otherwise the paint handler will still be run for the subsequent
tests. This ends up writing to the ‘state’ variable which used to be
on the stack so it will end up corrupting some stack variable. This
was causing test-cogl-premult to fail.

14 years agoclutter-group: Use g_list_foreach in clutter_group_real_foreach
Neil Roberts [Mon, 18 Jan 2010 12:35:05 +0000 (12:35 +0000)]
clutter-group: Use g_list_foreach in clutter_group_real_foreach

g_list_foreach has better protection against the current node being
removed. This will happen for example if someone calls
clutter_container_foreach(container, clutter_actor_destroy). This was
causing valgrind errors for the conformance tests which do just that.

14 years agowin32: Fix computation of the fullscreen size during stage realization
Samuel Degrande [Fri, 27 Nov 2009 15:53:50 +0000 (16:53 +0100)]
win32: Fix computation of the fullscreen size during stage realization

http://bugzilla.openedhand.com/show_bug.cgi?id=1905

Signed-off-by: Neil Roberts <neil@linux.intel.com>
14 years agodocs: Clarify usage of UTF-8 or ASCII art in commit messages
Emmanuele Bassi [Fri, 15 Jan 2010 17:32:46 +0000 (17:32 +0000)]
docs: Clarify usage of UTF-8 or ASCII art in commit messages

14 years agodocs: Display the features section
Emmanuele Bassi [Fri, 15 Jan 2010 17:06:56 +0000 (17:06 +0000)]
docs: Display the features section

The features section of the API reference is built but not used, and it
has some copy-and-paste errors.

14 years agoAdd test-cogl-texture-mipmaps to the Git ignore file
Emmanuele Bassi [Fri, 15 Jan 2010 14:50:06 +0000 (14:50 +0000)]
Add test-cogl-texture-mipmaps to the Git ignore file

14 years agox11: Fix typo in clutter_x11_set_use_argb_visual() declaration
Emmanuele Bassi [Fri, 15 Jan 2010 14:48:42 +0000 (14:48 +0000)]
x11: Fix typo in clutter_x11_set_use_argb_visual() declaration

The function should have a lowercase x11, not an uppercase X11 in its
name.

14 years agodocs: Ignore clutter-profile.h
Emmanuele Bassi [Fri, 15 Jan 2010 14:47:20 +0000 (14:47 +0000)]
docs: Ignore clutter-profile.h

14 years agotests: Add a simple conformance test for texture mipmaps
Neil Roberts [Fri, 15 Jan 2010 12:02:09 +0000 (12:02 +0000)]
tests: Add a simple conformance test for texture mipmaps

This adds a test which renders a texture into a 1x1 pixel quad with
and without filters that use mipmaps. The pixel without mipmaps will
be one of the colors from the texture and the one with will be the
average of all the pixels in the texture.

14 years agoAdd a notice of deprecation in the pre-Git ChangeLog
Emmanuele Bassi [Thu, 14 Jan 2010 15:23:41 +0000 (15:23 +0000)]
Add a notice of deprecation in the pre-Git ChangeLog

14 years agocogl-framebuffer: Return gboolean from try_creating_fbo
Neil Roberts [Tue, 12 Jan 2010 21:44:40 +0000 (21:44 +0000)]
cogl-framebuffer: Return gboolean from try_creating_fbo

When try_creating_fbo fails it returns 0 to report the error and if it
succeeds it returns ‘flags’. However cogl_offscreen_new_to_texture
also passes in 0 for the flags as the last fallback to create the fbo
with nothing but the color buffer. In that case it will return 0
regardless of whether it succeeded so the last fallback will always be
considered a failure.

To fix this it now just returns a gboolean to indicate whether it
succeeded and the flags used for each attempt is assigned when passing
the argument rather than from the return value of the function.

Also if the only configuration that succeeded was with flags==0 then
it would always try all combinations because last_working_flags would
also be zero. To avoid this it now uses a separate gboolean to mark
whether we found a successful set of flags.

http://bugzilla.openedhand.com/show_bug.cgi?id=1873

14 years agoconform: Add operators tests for ClutterColor
Emmanuele Bassi [Thu, 14 Jan 2010 14:07:04 +0000 (14:07 +0000)]
conform: Add operators tests for ClutterColor

The clutter_color_add() and clutter_color_subtract() functions are
lacking unit testing to catch eventual regressions.

14 years agomaster-clock: Add profiling timers
Emmanuele Bassi [Thu, 14 Jan 2010 12:28:07 +0000 (12:28 +0000)]
master-clock: Add profiling timers

Use the newly-added profiling timers inside the master clock dispatch
function to see how much time we spend:

  • in the whole function
    • in the event processing for each stage
    • in the timeline advancement

14 years agounits: Improve coverage of clutter_units_from_string()
Emmanuele Bassi [Wed, 13 Jan 2010 17:31:13 +0000 (17:31 +0000)]
units: Improve coverage of clutter_units_from_string()

Add a unit for an empty string as well as units for the missing unit
types like cm, mm and px.

14 years agoAdd test-cogl-multitexture to the Git ignore file
Emmanuele Bassi [Wed, 13 Jan 2010 16:57:55 +0000 (16:57 +0000)]
Add test-cogl-multitexture to the Git ignore file

14 years agobuild: Add a script to format gcov report lines
Emmanuele Bassi [Wed, 13 Jan 2010 16:35:53 +0000 (16:35 +0000)]
build: Add a script to format gcov report lines

Instead of using echo let's try Perl and the format() built-in.

14 years agoAdd gcov support to the build
Emmanuele Bassi [Mon, 4 Jan 2010 14:53:03 +0000 (14:53 +0000)]
Add gcov support to the build

Using gcov it's possible to get a coverage report, that is a break down
of how much the exposed API is exercised by the conformance test suite.

14 years agobuild: Clean up COGL build flags
Emmanuele Bassi [Wed, 13 Jan 2010 15:40:36 +0000 (15:40 +0000)]
build: Clean up COGL build flags

14 years agotexture: Remove reading the texture data back in ::unrealize()
Damien Lespiau [Mon, 2 Nov 2009 17:08:55 +0000 (17:08 +0000)]
texture: Remove reading the texture data back in ::unrealize()

Reading back the texture data in unrealize does not seem like a
desirable feature any more, clutter has evolved a lot since it was
implemented.

What's wrong with it now:

  * It takes *a lot* of time to read the data back with glReadPixel(),
  * When several textures share the same CoglTexture, the same data can
    be read back multiple times,
  * If the underlying material uses multiple texture units, only the
    first one was copied back,
  * In ClutterCairoTexture, we end up having two separate copies of the
    data,
  * GL actually manages texture memory accross system/video memory
    for us!

For all the reasons above, let's get rid of the glReadPixel() in
Texture::unrealize()

Fixes: OHB#1842

14 years agocogl-framebuffer: Add some missing GL defines
Neil Roberts [Tue, 12 Jan 2010 14:49:55 +0000 (14:49 +0000)]
cogl-framebuffer: Add some missing GL defines

Since 755cce33a7 the framebuffer code is using the GL enums
GL_DEPTH_ATTACHMENT and GL_DEPTH_COMPONENT16. These aren't available
directly under GLES except with the OES suffix so we need to define
them manually as we do with the other framebuffer constants.

14 years agocogl: Remove the CGL_* defines
Neil Roberts [Tue, 12 Jan 2010 14:43:36 +0000 (14:43 +0000)]
cogl: Remove the CGL_* defines

These macros used to define Cogl wrappers for the GLenum values. There are
now Cogl enums everywhere in the API where these were required so we
shouldn't need them anymore. They were in the public headers but as
they are not neccessary and were not in the API docs for Clutter 1.0
it should be safe to remove them.

14 years agostage: Add the delete-event signal
Emmanuele Bassi [Tue, 12 Jan 2010 15:44:28 +0000 (15:44 +0000)]
stage: Add the delete-event signal

Using the ::event signal to match the CLUTTER_DELETE event type (and
block the stage destruction) can be costly, since it means checking
every single event.

The ::delete-event signal is similar in spirit to any other specialized
signal handler dealing with events, and retains the same semantics.

14 years agojournal: Fixes logging of multiple sets of texture coordinates
Robert Bragg [Tue, 12 Jan 2010 11:02:09 +0000 (11:02 +0000)]
journal: Fixes logging of multiple sets of texture coordinates

If a user supplied multiple groups of texture coordinates with
cogl_rectangle_with_multitexture_coords() then we would repeatedly log only
the first group in the journal.  This fixes that bug and adds a conformance
test to verify the fix.

Thanks to Gord Allott for reporting this bug.

14 years agotext: Zero out the cursor_pos member
Emmanuele Bassi [Mon, 11 Jan 2010 17:08:42 +0000 (17:08 +0000)]
text: Zero out the cursor_pos member

Do not trust the zero-ing done by GObject on the private data structure,
and use memset() instead to zero the ClutterGeometry structure.

14 years agoRemove obsolete code from test-text
Emmanuele Bassi [Mon, 11 Jan 2010 17:06:52 +0000 (17:06 +0000)]
Remove obsolete code from test-text

The test-text "fake scrolling" code stopped working somewhere between
0.8 and 0.9, with the new layout code. Instead of the ::cursor-event
signal it should use an approach similar to the Scrollable interface in
the Moblin User Experience toolkit.

Right now, it makes sense to ignore this code entirely.

14 years agocogl: Support multiple fallbacks in cogl_offscreen_new_to_texture()
Robert Bragg [Mon, 30 Nov 2009 20:04:41 +0000 (20:04 +0000)]
cogl: Support multiple fallbacks in cogl_offscreen_new_to_texture()

The Intel drivers in Mesa 7.6 (and possibly earlier versions) don't
support creating FBOs with a stencil buffer but without a depth
buffer. This reworks framebuffer allocation so that we try a number
of fallback options before failing.

The options we try in order are:
- the same options that were sucessful last time if available
- combined depth and stencil
- separate depth and stencil
- just stencil, no depth
- just depth, no stencil
- neither depth or stencil

14 years agomedia: Add an API to specify which font should be used for subtitles
Damien Lespiau [Wed, 6 Jan 2010 11:48:46 +0000 (11:48 +0000)]
media: Add an API to specify which font should be used for subtitles

Allow the user of the ClutterMedia interface to specify a Pango font
description to display subtitles. Even if the underlying implementation
of the interface does not natively use Pange, it must be capable of
parsing the grammar that pango_font_description_from_string() accepts.

14 years agobuild: Clean up private header/source files
Emmanuele Bassi [Sun, 10 Jan 2010 11:35:26 +0000 (11:35 +0000)]
build: Clean up private header/source files

Some source files should not be passed through the introspection parser,
as they are fully private and do not expose any valuable API.

Also the clutter-profile.h header is private and should not be
installed.

14 years agoframebuffers: cogl_offscreen_new_to_texture should take a ref on the texture
Robert Bragg [Wed, 25 Nov 2009 14:26:32 +0000 (14:26 +0000)]
framebuffers: cogl_offscreen_new_to_texture should take a ref on the texture

We weren't taking a reference on the texture to be used as the color buffer
for offscreen rendering, so it was possible to free the texture leaving the
framebuffer in an inconsistent state.

14 years agoprofiling: Adds initial UProf accounting to Cogl
Robert Bragg [Fri, 3 Jul 2009 15:22:35 +0000 (16:22 +0100)]
profiling: Adds initial UProf accounting to Cogl

This adds gives Cogl a dedicated UProf context which will be linked together
with Clutter's context during clutter_init_real().

Initial timers cover _cogl_journal_flush and _cogl_journal_log_quad

You can explicitly ask for a report of Cogl statistics by exporting
COGL_PROFILE_OUTPUT_REPORT=1 but since the context is linked with Clutter's
the statisitcs will also be shown in the automatic Clutter reports.

14 years agoprofiling: Allow limiting statisics just to picking
Robert Bragg [Fri, 17 Apr 2009 11:15:56 +0000 (12:15 +0100)]
profiling: Allow limiting statisics just to picking

This suspends and resumes all uprof timers and counters except while dealing
with picking, so as to give more focused statistics.

Be aware that there are still some issues with this profile option since
there are a few special case counters and timers that shouldn't be
suspended; noteably the frame counters are incorrect so the per frame stats
can't be trusted.

14 years agoprofiling: Parse --clutter-profile and CLUTTER_PROFILE= options
Robert Bragg [Wed, 6 Jan 2010 18:15:13 +0000 (18:15 +0000)]
profiling: Parse --clutter-profile and CLUTTER_PROFILE= options

As we have for debugging, this adds the ability to control profiling flags
either via the command line or an environment variable.

The first option added is CLUTTER_PROFILE=disable-report

This also changes the reporting to be opt-out so you don't need to export
CLUTTER_PROFILE_OUTPUT_REPORT=1 to see a report but you can use
CLUTTER_PROFILE=disable-report to disable it if desired.

14 years agoprofiling: Adds initial UProf support across clutter
Robert Bragg [Mon, 30 Mar 2009 15:41:02 +0000 (16:41 +0100)]
profiling: Adds initial UProf support across clutter

UProf is a small library that aims to help applications/libraries provide
domain specific reports about performance.  It currently provides high
precision timer primitives (rdtsc on x86) and simple counters, the ability
to link statistics between optional components at runtime and makes report
generation easy.

This adds initial accounting for:
- Total mainloop time
- Painting
- Picking
- Layouting
- Idle time

The timing done by uprof is of wall clock time. It's not based on stochastic
samples we simply sample a counter at the start and end.  When dealing with
the complexities of GPU drivers and with various kinds of IO this form of
profiling can be quite enlightening as it will be able to represent where
your application is blocking unlike tools such as sysprof.

To enable uprof accounting you must configure Clutter with --enable-profile
and have uprof-0.2 installed from git://git.moblin.org/uprof

If you want to see a report of statistics when Clutter applications exit you
should export CLUTTER_PROFILE_OUTPUT_REPORT=1 before running them.

Just a final word of caution; this stuff is new and the manual nature of
adding uprof instrumentation means it is prone to some errors when modifying
code.  This just means that when you question strange results don't rule out
a mistake in the instrumentation.  Obviously though we hope the benfits out
weigh e.g.  by focusing on very key stats and by having automatic reporting.

14 years agoAdds a --enable-profile option to configure.ac
Robert Bragg [Tue, 17 Mar 2009 13:07:46 +0000 (13:07 +0000)]
Adds a --enable-profile option to configure.ac

There is nothing else hooked up to this option so far

14 years agox11: Switch back to RGB visuals by default
Emmanuele Bassi [Fri, 8 Jan 2010 15:04:56 +0000 (15:04 +0000)]
x11: Switch back to RGB visuals by default

Since asking for ARGB by default is still somewhat experimental on X11
and not every toolkit or complex widgets (like WebKit) still do not like
dealing with ARGB visuals, we should switch back to RGB by default - now
that at least we know it works.

For applications (and toolkit integration libraries) that want to enable
the ClutterStage:use-alpha property there is a new function:

  void clutter_x11_set_use_argb_visual (gboolean use_argb);

which needs to be called before clutter_init().

The CLUTTER_DISABLE_ARGB_VISUAL environment variable can still be used
to force this value off at run-time.

14 years agodoc: Fix media::{get,set}_subtitle_uri() symbol names
Damien Lespiau [Wed, 6 Jan 2010 00:44:24 +0000 (00:44 +0000)]
doc: Fix media::{get,set}_subtitle_uri() symbol names

At first, those symbols were called {get,set}_subtitles_uri() but were
renamed to {get,set}_subtitle_uri() without updating the
clutter-section.txt file.

This fix makes gtk-doc document those symbols again.

14 years agoactor: Just emit a relayout cycle warning
Emmanuele Bassi [Thu, 7 Jan 2010 11:08:52 +0000 (11:08 +0000)]
actor: Just emit a relayout cycle warning

Currently, ClutterActor detects a relayout cycle (an actor causing a
relayout to be queued from within an allocate() function) and aborts
after printing out a warning. This might be a little bit too anal
retentive, and it currently breaks GTK+ embedding inside clutter-gtk
so we should probably relax the behaviour a bit. Now we just emit the
warning but we still go ahead with the relayout.

14 years agoDon't set the GLX_TRANSPARENT_TYPE attribute to choose an FBConfig
Neil Roberts [Thu, 7 Jan 2010 15:58:53 +0000 (15:58 +0000)]
Don't set the GLX_TRANSPARENT_TYPE attribute to choose an FBConfig

When Clutter tries to pick an ARGB visual it tried to set the
GLX_TRANSPARENT_TYPE attribute of the FBConfig to
GLX_TRANSPARENT_RGB. However the code to do this was broken so that it
was actually trying to set the non-existant attribute number 0x8008
instead. Mesa silently ignored this so it appeared as if it was
working but the Nvidia drivers do not like it.

It appears that the TRANSPARENT_TYPE attribute is not neccessary for
getting an ARGB visual anyway and instead it is intended to support
color-key transparency. Therefore we can just remove it and get all of
the FBConfigs. Then if we need an ARGB visual we can just walk the
list to look for one with depth == 32.

The fbconfig is now stored in a single variable instead of having a
separate variable for the rgb and rgba configs because the old code
only ever retrieved one of them anyway.

14 years agoCovert stb_image.c to Unix format
Emmanuele Bassi [Tue, 5 Jan 2010 18:02:29 +0000 (18:02 +0000)]
Covert stb_image.c to Unix format

The file is still in DOS format (CRLF instead of LF) and this confuses
the hell out of some versions of Git.

14 years agoInclude cogl-defines.h before using GL types
Emmanuele Bassi [Tue, 5 Jan 2010 17:54:45 +0000 (17:54 +0000)]
Include cogl-defines.h before using GL types

If we are using GL* types we should also be including cogl-defines.h, as
that will include the right GL header.

14 years agocogl: Fix array annotations
Emmanuele Bassi [Tue, 5 Jan 2010 16:11:45 +0000 (16:11 +0000)]
cogl: Fix array annotations

The arrays in the cogl_program_set_uniform_* API should be marked as
such, and have their length arguments specified.

14 years agotext: Store the markup attributes separately
Neil Roberts [Tue, 5 Jan 2010 11:58:12 +0000 (11:58 +0000)]
text: Store the markup attributes separately

Previously when the markup property is set it would generate an
attribute list from the markup and then merge it with the attributes
from the attribute property and store it as the effective
attributes. The markup attributes and the marked up text would then be
forgotten. This breaks if the application then later changes the
attributes property because it would try to regenerate the effective
attributes from the markup text but the stored text no longer contains
any markup. If the original markup text happened to contain entities
like '&lt;' they would end up causing parse errors because they would
be converted to the actual symbols.

To fix this the attributes from the markup are now stored
independently from the effective attributes. The effective attributes
are now regenerated if either set of attributes changes right before a
layout is created.

http://bugzilla.openedhand.com/show_bug.cgi?id=1940

14 years agotext: Free the Pango attribute list resources
Neil Roberts [Tue, 5 Jan 2010 11:44:17 +0000 (11:44 +0000)]
text: Free the Pango attribute list resources

The ClutterText owns three PangoAttrList resources which were not
being unref'd. This adds the unref calls to the finalize method.

14 years agox11 tfp: Plug a leak
Emmanuele Bassi [Tue, 5 Jan 2010 14:10:19 +0000 (14:10 +0000)]
x11 tfp: Plug a leak

Destroy the dummy XImage we create even on success.

http://bugzilla.openedhand.com/show_bug.cgi?id=1918

Based on a patch by: Carlos Martín Nieto <carlos@cmartin.tk>

Signed-off-by: Emmanuele Bassi <ebassi@linux.intel.com>
14 years agoMerge branch 'matrix-mode'
Emmanuele Bassi [Tue, 5 Jan 2010 11:04:50 +0000 (11:04 +0000)]
Merge branch 'matrix-mode'

* matrix-mode:
  build: Move CoglMatrixMode to cogl-matrix-stack.h

14 years agoRemove trailing comma from test UI definition
Emmanuele Bassi [Tue, 5 Jan 2010 11:02:39 +0000 (11:02 +0000)]
Remove trailing comma from test UI definition

The animation definition test has a trailing comma at the end of an
array item.

14 years agoscript: Copy the JSON node in PropertyInfo
Emmanuele Bassi [Tue, 5 Jan 2010 10:55:28 +0000 (10:55 +0000)]
script: Copy the JSON node in PropertyInfo

PropertyInfo should store a copy of the JsonNodes it references, so
that property_info_free() can safely dispose them, and we can reference
values across different UI definition data.

The implicit timeline parsing code is not copying the JsonNode; this
leads to a double free in some cases, which is masked by the GSlice
allocator and produces a heap corruption later on.

14 years ago[media] Add an API to play a subtitle file along with the media
Damien Lespiau [Mon, 28 Dec 2009 16:52:43 +0000 (17:52 +0100)]
[media] Add an API to play a subtitle file along with the media

Allow the user of the ClutterMedia interface to specify an external (as
in not multiplexed with the audio/video streams) location of a subtitle
stream.

14 years agotext: Use G_SIGNAL_ACTION for ::insert-text and ::delete-text
Emmanuele Bassi [Mon, 4 Jan 2010 12:03:47 +0000 (12:03 +0000)]
text: Use G_SIGNAL_ACTION for ::insert-text and ::delete-text

Both the ::insert-text and ::delete-text are "action" signals, that is
signals that are safe to (and should) be emitted using g_signal_emit()
directly.

14 years agoAdded ClutterText::insert-text and ClutterText::delete-text signals
Alejandro Piñeiro [Fri, 20 Nov 2009 14:17:41 +0000 (15:17 +0100)]
Added ClutterText::insert-text and ClutterText::delete-text signals

* clutter/clutter-marshal.list: added new marshaller
* clutter/clutter-text.c
(clutter_text_class_init): added insert-text and delete-text signals
(clutter_text_insert_unichar): emits insert-text signal
(clutter_text_insert_text): emits insert-text signal
(clutter_text_delete_text): emits delete-text signal
(clutter_text_delete_chars): emits delete-text signal
(clutter_text_set_markup_internal): emits delete-text and insert-text signals
(clutter_text_set_text): emits delete-text and insert-text signals

http://bugzilla.openedhand.com/show_bug.cgi?id=1894

14 years agobuild: Move CoglMatrixMode to cogl-matrix-stack.h
Emmanuele Bassi [Mon, 4 Jan 2010 11:58:32 +0000 (11:58 +0000)]
build: Move CoglMatrixMode to cogl-matrix-stack.h

This avoids a redeclaration of _cogl_matrix_stack_flush_to_gl() from
using GLenum to CoglMatrixMode.

http://bugzilla.openedhand.com/show_bug.cgi?id=1928

14 years agocogl-texture: Remove return in void functions
Halton Huo [Mon, 4 Jan 2010 11:49:50 +0000 (11:49 +0000)]
cogl-texture: Remove return in void functions

http://bugzilla.o-hand.com/show_bug.cgi?id=1929

Signed-off-by: Emmanuele Bassi <ebassi@linux.intel.com>
14 years agobuild: Maintainer cflags go in the _CFLAGS target
Emmanuele Bassi [Mon, 4 Jan 2010 11:49:13 +0000 (11:49 +0000)]
build: Maintainer cflags go in the _CFLAGS target

The maintainer compiler flags are not pre-processor flags.

14 years agocogl: Const-ify vertices in cogl_polygon()
Emmanuele Bassi [Mon, 4 Jan 2010 11:43:00 +0000 (11:43 +0000)]
cogl: Const-ify vertices in cogl_polygon()

The CoglTextureVertex array passed to cogl_polygon() is a pure
in-argument and should be const-ified.

http://bugzilla.openedhand.com/show_bug.cgi?id=1917

14 years agomaster-clock: Take a reference before advancing timelines
Emmanuele Bassi [Wed, 11 Nov 2009 11:00:29 +0000 (11:00 +0000)]
master-clock: Take a reference before advancing timelines

A timeline advancement might cause another timeline to be
destroyed, which will likely lead to a segmentation fault.

Before advancing the timelines we should take a reference
on them - just like we do for the stages before doing
event processing. This will prevent dispose() from running
until the end of the advancement.

http://bugzilla.openedhand.com/show_bug.cgi?id=1854

14 years agoPost-release version bump to 1.1.5
Emmanuele Bassi [Sun, 3 Jan 2010 20:41:17 +0000 (20:41 +0000)]
Post-release version bump to 1.1.5

14 years agoRelease Clutter 1.1.4
Emmanuele Bassi [Sun, 3 Jan 2010 20:11:43 +0000 (20:11 +0000)]
Release Clutter 1.1.4

14 years agobuild: Remove dist rule for non-existing image files
Emmanuele Bassi [Sun, 3 Jan 2010 20:24:39 +0000 (20:24 +0000)]
build: Remove dist rule for non-existing image files

14 years agoDisable g_set_prgname()
Emmanuele Bassi [Sun, 3 Jan 2010 20:12:49 +0000 (20:12 +0000)]
Disable g_set_prgname()

Apparently, calling g_set_prgname() multiple times is not allowed
anymore, and hence clutter_init_* calls should not do that. Though this
is really GLib's fault - and a massive nuisance for us - we should
prolly comply to avoid the test suite dying on us.

14 years agoMerge branch 'animate-layout-manager' into ebassi-next
Emmanuele Bassi [Wed, 23 Dec 2009 10:38:02 +0000 (10:38 +0000)]
Merge branch 'animate-layout-manager' into ebassi-next

* animate-layout-manager:
  layout-manager: Document the animation support
  layout-manager: Rewind the timeline in begin_animation()
  box-layout: Remove the allocations hash table
  docs: Clean up the README file
  layout: Let begin_animation() return the Alpha
  box-layout: Add knobs for controlling animations
  box-layout: Animate layout properties
  layout: Add animation support to LayoutManager
  Add ActorBox animation methods

14 years agolayout-manager: Document the animation support
Emmanuele Bassi [Wed, 23 Dec 2009 10:35:16 +0000 (10:35 +0000)]
layout-manager: Document the animation support

Add a section inside the LayoutManager class API reference documenting,
with examples, how to implement animation support inside a layout
manager sub-class.

14 years agolayout-manager: Rewind the timeline in begin_animation()
Emmanuele Bassi [Wed, 23 Dec 2009 08:39:16 +0000 (08:39 +0000)]
layout-manager: Rewind the timeline in begin_animation()

If the default implementation begin_animation() is called twice then we
should rewind the timeline, as well as updating its duration and the
easing mode of the alpha.

14 years agobox-layout: Remove the allocations hash table
Emmanuele Bassi [Wed, 23 Dec 2009 08:34:08 +0000 (08:34 +0000)]
box-layout: Remove the allocations hash table

The BoxLayout uses a HashTable to map the latest stable allocation of
each child, in order to use that as the initial value during an
animation; this in spite of already having a perfectly valid per-child
storage as part of the layout manager: ClutterBoxChild.

The last stable allocation should be stored inside the ClutterBoxChild
instead of having it in the private data for ClutterBoxLayout. The
access remains O(1), since there is a 1:1 mapping between child and
BoxChild instances, but we save a little bit of memory and we avoid
keeping aroud allocations for old children.

14 years agodocs: Clean up the README file
Emmanuele Bassi [Tue, 22 Dec 2009 18:10:39 +0000 (18:10 +0000)]
docs: Clean up the README file

14 years agoMerge branch 'stage-use-alpha' into ebassi-next
Emmanuele Bassi [Sun, 20 Dec 2009 17:39:12 +0000 (17:39 +0000)]
Merge branch 'stage-use-alpha' into ebassi-next

* stage-use-alpha:
  tests: Use accessor methods for :use-alpha
  stage: Add accessors for :use-alpha
  tests: Allow setting the stage opacity in test-paint-wrapper
  stage: Premultiply the stage color
  stage: Composite the opacity with the alpha channel
  glx: Always request an ARGB visual
  stage: Add :use-alpha property
  materials: Get the right blend function for alpha

14 years agoMerge branch 'internal-flag' into ebassi-next
Emmanuele Bassi [Sun, 20 Dec 2009 17:33:51 +0000 (17:33 +0000)]
Merge branch 'internal-flag' into ebassi-next

* internal-flag:
  conform: Add test unit for the destruction of Containers
  actor: Add internal child flag
  Clean up whitespace, indentation and comments

14 years agoconform: Add test unit for the destruction of Containers
Emmanuele Bassi [Fri, 18 Dec 2009 23:29:11 +0000 (23:29 +0000)]
conform: Add test unit for the destruction of Containers

Verify that internal children do not go through the remove()
implementation, and that non-internal children do.