Emmanuele Bassi [Tue, 9 Feb 2010 15:29:29 +0000 (15:29 +0000)]
docs: Clean up the unused symbols for Cogl
Gtk-doc is reporting a lot of false positives in the unused text file,
mostly because of new private files that have been added to Cogl but not
to the gtk-doc ignore list for the Cogl API reference.
Once the false positives have been removed we have a couple of really
missing symbols that should be added to the cogl-sections.txt file.
Bastian Winkler [Tue, 9 Feb 2010 14:19:03 +0000 (15:19 +0100)]
cogl-buffer: Use correct argument types in cogl_buffer_set_data_EXP
offset and size arguments are gsize in cogl-buffer.h
http://bugzilla.openedhand.com/show_bug.cgi?id=1980
Signed-off-by: Emmanuele Bassi <ebassi@linux.intel.com>
Emmanuele Bassi [Tue, 9 Feb 2010 14:48:11 +0000 (14:48 +0000)]
docs: Move some Cogl defines in the private section
The PixelFormat bit and mask #defines should not be used and are there
mostly for convenience, so we can push them to the "private" sub-section
of the API reference.
This pushed Cogl's API reference coverage to 100%.
Emmanuele Bassi [Tue, 9 Feb 2010 14:41:37 +0000 (14:41 +0000)]
docs: Fixes for Cogl API reference
98% symbol docs coverage.
335 symbols documented.
0 symbols incomplete.
8 not documented.
Not bad, if I may say so.
Emmanuele Bassi [Tue, 9 Feb 2010 13:39:08 +0000 (13:39 +0000)]
Post-release bump to 1.1.11
Emmanuele Bassi [Tue, 9 Feb 2010 12:31:42 +0000 (12:31 +0000)]
Release 1.1.10
Brown paper bag release.
Emmanuele Bassi [Tue, 9 Feb 2010 12:59:18 +0000 (12:59 +0000)]
Update NEWS file
Emmanuele Bassi [Tue, 9 Feb 2010 11:29:39 +0000 (11:29 +0000)]
build: Always build conformance tests with debug symbols
Having the conformance test suite build without debug symbols doesn't
make any sense.
Robert Bragg [Tue, 9 Feb 2010 13:00:39 +0000 (13:00 +0000)]
conform: fix stack corruption in test-behaviours.c
The test was calling g_object_get to fetch the "opacity-start" property
(unsigned int) into a guint8 local variable. It's a bit of a mean trap
given that the getter function returns guint8 values so this also adds a
comment explaining what's going on.
Neil Roberts [Tue, 9 Feb 2010 12:21:10 +0000 (12:21 +0000)]
cogl-texture-2d: Use _cogl_texture_driver_gen to generate the GL tex
_cogl_texture_driver_gen is needed to set the texture minification
mode to Cogl's default of GL_LINEAR. There was also a line to set this
in _cogl_texture_2d_new_with_size but it wasn't working because it was
called *before* the texture was bound. If the texture was later
rendered with the default material it then it would end up with GL's
default mipmap filtering mode but without mipmaps so it would render
white squares instead.
Neil Roberts [Fri, 18 Dec 2009 21:17:21 +0000 (21:17 +0000)]
cogl: Use SSE2 when possible for premultiplying
This adds a fast path for premultiplying an RGBA image using SSE2
instructions. SSE registers are 128-bit and we need at least 16-bits
per component for the intermediate result of the multiplication so we
can do two pixels in parallel with one register. The function
interleaves 2 SSE registers to multiply 4 pixels in one function call
with the hope that this will pipeline better.
http://bugzilla.openedhand.com/show_bug.cgi?id=1939
Signed-off-by: Emmanuele Bassi <ebassi@linux.intel.com>
Emmanuele Bassi [Tue, 9 Feb 2010 10:34:41 +0000 (10:34 +0000)]
actor: Improve readability of raise/lower warnings
• Add the function name in the warning, since the text is the same in
both clutter_actor_raise() and clutter_actor_lower().
• If an actor has a name then prefer it to the type name.
Halton Huo [Tue, 9 Feb 2010 10:21:37 +0000 (10:21 +0000)]
Remove return from void functions
This patch fixes compilation on suncc.
http://bugzilla.openedhand.com/show_bug.cgi?id=1978
Signed-off-by: Emmanuele Bassi <ebassi@linux.intel.com>
Emmanuele Bassi [Mon, 8 Feb 2010 18:09:14 +0000 (18:09 +0000)]
Post-release bump to 1.1.9
Emmanuele Bassi [Mon, 8 Feb 2010 17:57:48 +0000 (17:57 +0000)]
Release Clutter 1.1.8
Emmanuele Bassi [Mon, 8 Feb 2010 17:56:35 +0000 (17:56 +0000)]
test-animator: Do not use mid-function blocks
The test_animator_properties unit is so small that declaring a
mid-function block for two variables is not that clever.
Emmanuele Bassi [Mon, 8 Feb 2010 17:55:29 +0000 (17:55 +0000)]
animator: Zero the AnimatorKey:value member
The test suite is showing random segfaults because the GValue member of
AnimatorKey is not zero-ed on creation.
Emmanuele Bassi [Mon, 8 Feb 2010 17:37:00 +0000 (17:37 +0000)]
docs: Fixes for ClutterAnimator
Emmanuele Bassi [Mon, 8 Feb 2010 17:34:11 +0000 (17:34 +0000)]
Merge me
Emmanuele Bassi [Mon, 8 Feb 2010 17:27:20 +0000 (17:27 +0000)]
docs: Update NEWS
Emmanuele Bassi [Mon, 8 Feb 2010 17:27:13 +0000 (17:27 +0000)]
docs: Update the release notes
Damien Lespiau [Mon, 8 Feb 2010 17:11:43 +0000 (17:11 +0000)]
cogl-buffer: Use TEXTURE as the only value for CoglBufferUsageHint
We should try to use more explicit defines than GL for our hints. For
now we only support using a CoglBuffer to generate textures.
Damien Lespiau [Tue, 2 Feb 2010 16:44:16 +0000 (16:44 +0000)]
cogl-buffer: make sure the code compiles on GL ES
OpenGL ES has no PBO extension, so we fallback to using a malloc'ed
buffer. Make sure the OpenGL-only defines don't leak into the OpenGL ES
compilation.
Damien Lespiau [Tue, 2 Feb 2010 12:59:51 +0000 (12:59 +0000)]
cogl-pixel-buffer: Add a fallback path
First, let's add a new public feature called, surprisingly,
COGL_FEATURE_PBOS to check the availability of PBOs and provide a
fallback path when running on older GL implementations or on OpenGL ES
In case the underlying OpenGL implementation does not provide PBOs, we
need a fallback path (a malloc'ed buffer). The CoglPixelBufer
constructors will instanciate a subclass of CoglBuffer that handles
map/unmap and set_data() with a malloc'ed buffer.
The public feature is useful to check before using set_data() on a
buffer as it will mean doing a memcpy() when not supporting PBOs (in
that case, it's better to create the texture directly instead of using a
CoglBuffer).
Damien Lespiau [Fri, 22 Jan 2010 15:38:31 +0000 (15:38 +0000)]
tests: Add a test for CoglPixelBuffers
Exercise the whole public CoglBuffer / CoglPixelBuffer and
cogl_texture_new_from_buffer API.
Damien Lespiau [Fri, 22 Jan 2010 15:07:27 +0000 (15:07 +0000)]
cogl-texture: Add a new constructor to turn CoglBuffers into textures
The only goal of using COGL buffers is to use them to create
textures. cogl_texture_new_from_buffer() is the new symbol to create
textures out of buffers.
Damien Lespiau [Sun, 10 Jan 2010 18:04:29 +0000 (18:04 +0000)]
cogl-pixel-buffer: add a pixel buffer object class
This subclass of CoglBuffer aims at wrapping PBOs or other system
surfaces like DRM buffer objects. Two constructors are available:
cogl_pixel_buffer_new() with a size when you only care about the size of
the buffer (such a buffer can be used to store several texture data such
as the three planes of a I420 frame).
cogl_pixel_buffer_new_full() is more a 1:1 mapping between the data and
an underlying surface, with the possibility of having access to a low
level memory buffer that may have a stride.
Damien Lespiau [Sun, 10 Jan 2010 17:28:24 +0000 (17:28 +0000)]
cogl-buffer: add an abstract class around openGL's buffer objects
Buffer objects are cool! This abstracts the buffer API first introduced
by GL_ARB_vertex_buffer_object and then extended to other objects.
The coglBuffer abstract class is intended to be the base class of all
the buffer objects, letting the user map() buffers. If the underlying
implementation does not support buffer objects (or only support VBO but
not FBO for instance), fallback paths should be provided.
Damien Lespiau [Mon, 25 Jan 2010 11:21:05 +0000 (11:21 +0000)]
cogl: new textures sould have GL_TEXTURE_MIN_FILTER set to GL_LINEAR
The only way the user has to set the mipmap filters is through the
material/layer API. This API defaults to GL_LINEAR/GL_LINEAR for the max
and min filters. With the main use case of cogl being 2D interfaces, it
makes sense do default to GL_LINEAR for the min filter.
When creating new textures, we did not set any filter on them, using
OpenGL defaults': GL_NEAREST_MIPMAP_LINEAR for the min filter and
GL_LINEAR for the max filter. This will make the driver allocate memory
for the mipmap tree, memory that will not be used in the nominal case
(as the material API defaults to GL_LINEAR).
This patch tries to ensure that the min filter is set to GL_LINEAR
before any glTexImage*() call is done on the texture by setting the
filter when generating new OpenGL handles.
Damien Lespiau [Mon, 11 Jan 2010 00:15:25 +0000 (00:15 +0000)]
cogl: Introduce the GE_RET() debug macro
Some GL functions have a return value that the GE() macro is not able to
handle. Let's define a new Ge_RET() macro which will be able to handle
functions such as glMapBuffer().
While at it, removed the unused variadic dots to the GE() macro.
Emmanuele Bassi [Mon, 8 Feb 2010 16:53:11 +0000 (16:53 +0000)]
Merge branch 'animator-parser'
* animator-parser:
docs: Describe the Animation definition syntax
animator: Provide a ClutterScript parser
animator: Allow retrieving type property type from a key
script: Use a node when resolving an animation mode
Emmanuele Bassi [Mon, 8 Feb 2010 16:50:29 +0000 (16:50 +0000)]
docs: Describe the Animation definition syntax
The ClutterAnimator documentation needs a section on the syntax of its
ClutterScript definition, possibly with an example.
Emmanuele Bassi [Mon, 8 Feb 2010 15:52:18 +0000 (15:52 +0000)]
animator: Provide a ClutterScript parser
The whole point of having the Animator class is that the developer can
describe a complex animation using ClutterScript. Hence, ClutterAnimator
should hook into the Script machinery and parse a specific description
format for its keys.
Emmanuele Bassi [Mon, 8 Feb 2010 15:47:46 +0000 (15:47 +0000)]
animator: Allow retrieving type property type from a key
When asking a key for its target value we also ask the developer to pass
in an initialized GValue - but we don't make it easy to know the type of
the GValue. A developer has to ask the GObject class for the GParamSpec
and then initialize the GValue, instead.
Since we know the type of the GValue we should provide a getter for it.
We should also allow developers to throw at us GValue with compatible and
transformable types.
Finally, all the accessors should be constified.
Emmanuele Bassi [Mon, 8 Feb 2010 15:45:43 +0000 (15:45 +0000)]
script: Use a node when resolving an animation mode
Instead of taking a string and duplicating the "is it a string or an
integer" check in both Alpha and Animation, the function in
ClutterScript that resolves the animation mode values should take a
JsonNode and do all the checks it needs.
Robert Bragg [Thu, 14 Jan 2010 18:11:57 +0000 (18:11 +0000)]
cogl path: make sure marking the clip state dirty takes affect
When we trashed the contents of the stencil buffer during
_cogl_path_fill_nodes we marked the clip stack state as dirty and expected
the clip stack code would clean up our glStencilFunc state.
The problem is that we only try and update the clip state during
_cogl_journal_init (when we flush the framebuffer state) which is only
called when the journal first gets something logged in it.
To make sure the stencil state is cleaned up we now also flush the journal
so _cogl_journal_init will be called for the next logged rectangle.
Neil Roberts [Fri, 5 Feb 2010 21:56:31 +0000 (21:56 +0000)]
clutter-master-clock: Don't wait for a frame if time goes backwards
If we aren't syncing to vblank or if the last dispatch didn't cause a
redraw then the master clock will try to wait at least a small amount
of time before dispatching again. However if time goes backwards then
it would not do a dispatch until time catches up again. To fix this it
know just runs a dispatch immediately if time goes backwards.
This is related to Moblin bug #3839. There was a similar fix for this
in
9dc012c07, however that only fixed the case where timelines
wouldn't update. If there are no animations running then the master
clock won't even try updating timelines until time catches up.
http://bugzilla.o-hand.com/show_bug.cgi?id=1974
Emmanuele Bassi [Mon, 8 Feb 2010 10:40:39 +0000 (10:40 +0000)]
test-flow-layout: Remove unneeded Stage sizing
The bug with resizable stages getting a 1, 1 window on X11 has been
fixed by Chris.
Emmanuele Bassi [Mon, 8 Feb 2010 10:34:22 +0000 (10:34 +0000)]
Merge remote branch 'origin/cwiiis-stage-resize'
* origin/cwiiis-stage-resize:
[stage-x11] Set the default size differently
[stage] Set default size correctly
Revert "[x11] Don't set actor size on ConfigureNotify"
[x11] Don't set actor size on ConfigureNotify
[stage] Now that get_geometry works, use it
[stage-x11] make get_geometry always get geometry
[stage] Get the current size correctly
[stage] Set minimum width/height to 1x1
[stage] Add set/get_minumum_size
Øyvind Kolås [Fri, 5 Feb 2010 12:32:00 +0000 (12:32 +0000)]
Add ClutterAnimator
ClutterAnimator is a class for managing the animation of multiple
properties of multiple actors over time with keyframing of values.
The Animator class is meant to be used to effectively describe
animations using the ClutterScript definition format, and to construct
complex implicit animations from the ground up.
Signed-off-by: Emmanuele Bassi <ebassi@linux.intel.com>
Chris Lord [Sun, 7 Feb 2010 18:17:43 +0000 (19:17 +0100)]
[stage-x11] Set the default size differently
We want to set the default size without triggering the layout machinary,
so change the window creation process slightly so we start with a
640x480 window.
Chris Lord [Sun, 7 Feb 2010 13:18:14 +0000 (14:18 +0100)]
[stage] Set default size correctly
Due to the way the new sizing works, clutter stage must set its size in
init (to maintain old behaviour) and the properties on the X11 stage
must be initialised to 1x1 so that it actually goes ahead with the
resize.
Fixes stages that aren't user resizable and have no size set from
appearing at 1x1.
Chris Lord [Sat, 6 Feb 2010 15:57:37 +0000 (16:57 +0100)]
Revert "[x11] Don't set actor size on ConfigureNotify"
This reverts commit
29cc027f069c9ad900b9044cd40075c2d17be736.
I misunderstood the problem, this commit breaks resizes coming from
outside of Clutter.
Chris Lord [Sat, 6 Feb 2010 15:47:22 +0000 (16:47 +0100)]
[x11] Don't set actor size on ConfigureNotify
Calling clutter_actor_set_size in response to ConfigureNotify makes
setting the size of the stage racy - the most common result of which
seems to be that you can't set the stage dimensions to anything less
than 640x480.
Instead, add a first_allocation bit to the private structure of the X11
stage and force the first resize (necessary or the default stage will be
a 1x1 window).
Chris Lord [Sat, 6 Feb 2010 14:41:01 +0000 (15:41 +0100)]
[stage] Now that get_geometry works, use it
We want the actual window geometry in clutter_stage_set_minimum_size,
not the set size. Now that the geometry function has been changed to do
what it says, use it.
Chris Lord [Sat, 6 Feb 2010 14:34:55 +0000 (15:34 +0100)]
[stage-x11] make get_geometry always get geometry
Now that we have a minimum size getter on the stage object, change
get_geometry to actually always return the geometry. This fixes stages
that are set as user-resizable appearing at 1x1 size.
This will need changing in other back-ends too.
Chris Lord [Sat, 6 Feb 2010 13:59:51 +0000 (14:59 +0100)]
[stage] Get the current size correctly
Get the current size of the stage correctly in
clutter_stage_set_minimum_size. The get_geometry StageWindow function is
not equivalent of the current size, use clutter_actor_get_size().
Chris Lord [Sat, 6 Feb 2010 13:04:47 +0000 (14:04 +0100)]
[stage] Set minimum width/height to 1x1
Whoops, to maintain the old behaviour, make sure the default minimum
width/height are 1x1.
Chris Lord [Sat, 6 Feb 2010 11:23:37 +0000 (11:23 +0000)]
[stage] Add set/get_minumum_size
Add two functions to set/get the minimum stage size. This takes effect
when a stage is set to user resizable.
Emmanuele Bassi [Sat, 6 Feb 2010 11:00:50 +0000 (11:00 +0000)]
Add cogl-subtexture test to the Git ignore file
Emmanuele Bassi [Fri, 5 Feb 2010 16:22:09 +0000 (16:22 +0000)]
Deprecate clutter_util_next_p2()
The next_p2() function should have never been publicly exposed by
Clutter.
Emmanuele Bassi [Fri, 5 Feb 2010 15:31:18 +0000 (15:31 +0000)]
docs: Fix whitespace in the App manual stub
Emmanuele Bassi [Fri, 5 Feb 2010 14:47:39 +0000 (14:47 +0000)]
build: Add suppressions file to EXTRA_DIST
Neil Roberts [Sat, 6 Feb 2010 00:20:07 +0000 (00:20 +0000)]
Merge branch 'more-texture-backends'
This adds three new texture backends.
- CoglTexture2D: This is a trimmed down version of CoglTexture2DSliced
which only supports a single texture and only works with the
GL_TEXTURE_2D target. The code is a lot simpler so it has a less
overheads than dealing with slices. Cogl will use this wherever
possible.
- CoglSubTexture: This is used to get a CoglHandle to represent a
subregion of another texture. The texture can be used as if it was a
standalone texture but it does not need to copy the resources.
- CoglAtlasTexture: This collects RGB and RGBA textures into a single
GL texture with the aim of reducing texture state changes and
increasing batching. The backend will try to manage the atlas and
may move the textures around to close gaps in the texture. By
default all textures will be placed in the atlas.
Neil Roberts [Sat, 6 Feb 2010 00:12:10 +0000 (00:12 +0000)]
cogl-bitmap: Update the format after (un)premultiplying
The pixel format of the bitmap needs to have its premult flag cleared
or set after the premult conversion otherwise it may get converted
again.
Neil Roberts [Fri, 5 Feb 2010 17:03:04 +0000 (17:03 +0000)]
cogl-atlas-texture: Fix a cut and paste error when getting the height
There was a typo in getting the height of the full texture to check
whether the sub region fits so that it was using the width
instead. This was causing crashes when debugging is enabled for some
apps.
Damien Lespiau [Thu, 4 Feb 2010 21:10:02 +0000 (21:10 +0000)]
docs: Use % for defines not #
Some links to defines in the gtk-doc annotations were using '#' instead
of '%'.
Damien Lespiau [Wed, 27 Jan 2010 16:03:28 +0000 (16:03 +0000)]
docs: fix new line in the cogl xml top level document
A comma in the FSF address is wrong. Supreme Offence.
Emmanuele Bassi [Thu, 4 Feb 2010 18:29:47 +0000 (18:29 +0000)]
event: Do not generate click count for SCROLL events
The ClutterScrollEvent structure does not have a click count field,
so Clutter should not generate the click count for events of type
CLUTTER_SCROLL.
Emmanuele Bassi [Thu, 4 Feb 2010 16:49:06 +0000 (16:49 +0000)]
tests: Add a Valgrind suppression file
When running tests under Valgrind it would be useful to pass a
suppression file for the known one-off allocations done by Clutter
and by its dependencies. This trims the output of Valgrind and
improves the ability to actually spot leaks.
Neil Roberts [Thu, 4 Feb 2010 16:28:29 +0000 (16:28 +0000)]
glx: Create a colormap for the dummy window
Otherwise X will fail to create the window and throw a BadMatch error
at least on NVidia.
Emmanuele Bassi [Thu, 4 Feb 2010 13:59:39 +0000 (13:59 +0000)]
glx: Clarify *why* we need the dummy window
The reason why we have a dummy, offscreen Window when we create the
GLX context is that GLX does not like it when you ask the context for
features if it's not made current to a Drawable. Maybe in the future
it will allow us to do so, but right now we have to make do with what
GLX offers us.
Emmanuele Bassi [Thu, 4 Feb 2010 13:56:33 +0000 (13:56 +0000)]
glx: Do not leak a XVisualInfo
The XVisualInfo we retrieve for the dummy window should be freed after
we used it.
Neil Roberts [Wed, 3 Feb 2010 23:08:30 +0000 (23:08 +0000)]
cogl-texture: Avoid copying the bitmap when premultiplying from a file
In cogl_texture_new_from_file we create and own a temporary
bitmap. There's no need to copy this data if we need to do a premult
conversion so instead it just does conversion before passing it on to
cogl_texture_new_from_bitmap.
Neil Roberts [Wed, 3 Feb 2010 22:54:44 +0000 (22:54 +0000)]
cogl-texture: Split out _cogl_texture_prepare_for_upload
The Cogl atlas code was using _cogl_texture_prepare_for_upload with a
NULL pointer for the dst_bmp to determine the internal format of the
texture without converting the bitmap. It needs to do this to decide
whether the texture will go in the atlas before wasting time on the
conversion. This use of the function is a little confusing so that
part of it has been split out into a new function called
_cogl_texture_determine_internal_format. The code to decide whether a
premult conversion is needed has also been split out.
Neil Roberts [Wed, 3 Feb 2010 19:54:12 +0000 (19:54 +0000)]
cogl-atlas: Make the cogl_atlas_* API internal
This just adds an underscore to every entry point for the CoglAtlas
API so that it's not exported.
Jussi Kukkonen [Wed, 3 Feb 2010 17:04:38 +0000 (17:04 +0000)]
text: implement del_word_next/del_word_prev()
Bind ctrl-backspace and ctrl-del to functions that delete a word before
or after the cursor, respectively.
Selection does not affect the deletion, but current selection is
preserved. This mimicks GTK+ functionality in GtkTextView and GtkEntry.
http://bugzilla.openedhand.com/show_bug.cgi?id=1767
Signed-off-by: Emmanuele Bassi <ebassi@linux.intel.com>
Emmanuele Bassi [Wed, 9 Dec 2009 00:50:33 +0000 (00:50 +0000)]
Remove the SDL backend
The SDL API is far too limited for the windowing system needs of
Clutter; the status of the SDL backend was always experimental, and
since the Windows platform is supported by a native backend there is
no point in having the SDL backend around any more.
Neil Roberts [Wed, 20 Jan 2010 16:41:25 +0000 (16:41 +0000)]
win32: Use a dummy window to support delayed stage creation
The Win32 backend now implements the create_context method which
creates a context and binds it to a 1x1 invisible window. That way
there will always be a context bound and the features can be retrieved
without creating the default stage. This reflects the changes in
1c6ffc8..b245d55 to the GLX backend.
Emmanuele Bassi [Sun, 6 Dec 2009 18:56:14 +0000 (18:56 +0000)]
glx: Fix error messages and debug notes
Instead of using g_critical() inside the create_context() implementation
of the ClutterBackendGLX we should use the passed GError, so that the
error message can bubble up to the caller.
Emmanuele Bassi [Thu, 3 Dec 2009 21:07:45 +0000 (21:07 +0000)]
stage: Create the default stage on demand
Instead of creating the default stage during initialization we can
now safely create it whenever clutter_stage_get_default() is called.
To maintain the invariant, the default stage is immediately realized
by Clutter itself.
Emmanuele Bassi [Thu, 3 Dec 2009 20:49:54 +0000 (20:49 +0000)]
glx: Create the dummy Window with the GLX context
Since we must guarantee that Cogl has a GL context to query, it is too
late to use the "dummy Window" trick from within the get_features()
virtual function implementation.
Instead, we can create a dummy Window from create_context() itself and
leave it around - basically trading a default stage with a dummy X
window.
We need to have the dummy X window around all the time so that the
GLX context can be selected and made current.
Emmanuele Bassi [Thu, 3 Dec 2009 20:48:55 +0000 (20:48 +0000)]
feature: Make sure we have a GL context
Before asking Cogl and ClutterBackend for the list of features we must
have a GL backend ready.
Emmanuele Bassi [Thu, 3 Dec 2009 20:47:48 +0000 (20:47 +0000)]
stage: Move default title in Stage.init
The default title should be set from within clutter_stage_init(); at
that point clutter_init() must have been called.
Emmanuele Bassi [Thu, 3 Dec 2009 17:36:03 +0000 (17:36 +0000)]
Lazily create the Pango fontmap
The Pango fontmap needed by Clutter should be initialized the first
time we need a PangoContext, not on initialization.
Emmanuele Bassi [Thu, 3 Dec 2009 17:13:44 +0000 (17:13 +0000)]
Delay default stage creation
The default stage creation should be delayed as much as possible,
ideally at the end of the init() process.
Emmanuele Bassi [Thu, 3 Dec 2009 17:35:19 +0000 (17:35 +0000)]
cogl-debug: Remove redundant newlines
The debugging notes wrapping g_debug() already have an implicit newline
at the end of the passed message.
Emmanuele Bassi [Wed, 3 Feb 2010 15:05:37 +0000 (15:05 +0000)]
tests: Clean up the cairo-flowers interactive test
Emmanuele Bassi [Wed, 3 Feb 2010 14:35:45 +0000 (14:35 +0000)]
text: Add :font-description
High level toolkits might wish to construct a PangoFontDescription and
then set it directly on a ClutterText actor proxy or sub-class.
ClutterText should have a :font-description property to set (and get)
the PangoFontDescription.
http://bugzilla.openedhand.com/show_bug.cgi?id=1960
Neil Roberts [Wed, 3 Feb 2010 14:31:12 +0000 (14:31 +0000)]
cogl-vertex-buffer: Refix disabling texture coord arrays
Commit
92a375ab4 changed the initial value of max_texcoord_attrib_unit
to -1 so that it could disable the texture coord array for the first
texture unit when there are no texture coords used in the vbo. However
max_texcoord_attrib_unit was an unsigned value so this actually became
G_MAXUINT. The disabling loop at the bottom still worked because
G_MAXUINT+1==0 but the check for whether any texture unit is greater
than max_texcoord_attrib_unit was failing so it would always end up
disabling all texture units. This is now fixed by changing
max_texcoord_attrib_unit to be signed.
Emmanuele Bassi [Tue, 2 Feb 2010 17:07:22 +0000 (17:07 +0000)]
text: Fixes for selection bound
The commit
ecbb7ce41a1a759e246fce07f146b8bed5e3d730 exposed some issues
when positioning the cursor with the mouse pointer: the selection is
not moved along with the cursor when inserting a single character or a
string.
Also, some freeze_notify() are called too early, leading to decoupling
from their respective thaw_notify().
http://bugzilla.openedhand.com/show_bug.cgi?id=1955
Kristian Høgsberg [Wed, 27 Jan 2010 17:55:18 +0000 (12:55 -0500)]
Use ClutterTimeline in test-clutter-cairo-flowers.c
http://bugzilla.openedhand.com/show_bug.cgi?id=1969
Signed-off-by: Emmanuele Bassi <ebassi@linux.intel.com>
Emmanuele Bassi [Tue, 2 Feb 2010 14:50:03 +0000 (14:50 +0000)]
docs: Clarify Group's sizing semantics
The documentation for ClutterGroup behaviour when setting an explicit
size is not accurate - or, actually, it was accurate by the time
ClutterGroup was first written but has been neglected in the following
release cycles.
To avoid confusion for new users of Clutter the documentation should be
slightly expanded, mentioning the exact semantics of ClutterGroup with
regards to: preferred size, explicitly set size and how to constrain the
visible area of a ClutterGroup to an explicitly set size.
Based on a patch by: Neil Roberts <neil@linux.intel.com>
Emmanuele Bassi [Tue, 2 Feb 2010 12:56:04 +0000 (12:56 +0000)]
tests: Add an initial Behaviour conformance suite
The coverage of the Behaviour sub-classes is currently abysmal. An
initial test suite for Behaviours should at least verify that the
accessors and the constructors are doing the right thing.
This initial test suite just verifies the BehaviourOpacity sub-class,
but it already bumps up the overall coverage by 2%.
Emmanuele Bassi [Tue, 2 Feb 2010 12:54:51 +0000 (12:54 +0000)]
behaviour: Clean up BehaviourOpacity
• Use a consistent coding style
• Call set_bounds() from set_property(), because we need proper
notification on the modified property
Emmanuele Bassi [Mon, 1 Feb 2010 15:47:50 +0000 (15:47 +0000)]
event: Unify the off-stage motion events delivery behaviour
When we disable the per-actor events delivery Clutter replicates the X11
implicit soft grab for motion events with off-stage. The implicit grab
is done whenever the pointer of a device leaves a window with a button
still pressed; with the implicit grab in place the window still receives
motion events even after the LeaveNotify - until the button is released.
The implicit grab is not honoured in the per-actor event deliver case,
though, so we have a mismatch between two in theory equivalent cases.
Luckily, the fix is pretty trivial: when we check for a motion event
with a stage set but without an actor set, and that has off-stage
coordinates, we arbitrarily set the source to be the stage of the event
and emit the pointer event.
Emmanuele Bassi [Mon, 1 Feb 2010 14:53:13 +0000 (14:53 +0000)]
build: -Wformat is required for -Wformat-security
GCC will ignore -Wformat-security without -Wformat on the same compiler
flags.
Emmanuele Bassi [Mon, 1 Feb 2010 14:48:50 +0000 (14:48 +0000)]
build: Retrieve X11 cflags and libraries
When using pkg-config to check for the x11 package compiler flags and
libraries we actually need to retrieve those values from the pc file.
This should also fix the issue with non-canonical installations of the
X11 headers and shared objects.
http://bugzilla.openedhand.com/show_bug.cgi?id=1966
Neil Roberts [Mon, 1 Feb 2010 13:37:19 +0000 (13:37 +0000)]
Merge remote branch 'master' into texture-debugging
Conflicts:
clutter/cogl/cogl/cogl-context.h
Neil Roberts [Mon, 1 Feb 2010 13:25:19 +0000 (13:25 +0000)]
cogl-material: Compare GL texture numbers for material layer textures
When deciding if a material layer is equal it now compares the GL
target and texture number if the textures are not sliced. This is
needed to get batching across atlased textures.
Neil Roberts [Mon, 1 Feb 2010 12:11:58 +0000 (12:11 +0000)]
cogl: Let GL do the format conversion when uploading texture data
Cogl accepts a pixel format for both the data in memory and the
internal format to be used for the texture. If they do not match then
it would convert them using the CoglBitmap functions before uploading
the data. However, GL also lets you specify both formats so it makes
more sense to let GL do the conversion. The driver may need the
texture in a specific format so it may end up being converted anyway.
The cogl_texture_upload_data functions have been removed and replaced
with a single function to prepare the bitmap. This will only do the
premultiplication conversion because that is the only part that GL
can't do directly.
Neil Roberts [Fri, 29 Jan 2010 15:15:08 +0000 (15:15 +0000)]
cogl: Do the premult conversion in-place rather than copying to a new buffer
The premult part of _cogl_convert_premult has now been split out as
_cogl_convert_premult_status. _cogl_convert_premult has been renamed
to _cogl_convert_format to make it less confusing. The premult
conversion is now done in-place instead of copying the
buffer. Previously it was copying the buffer once for the format
conversion and then copying it again for the premult conversion. The
premult conversion never changes the size of the buffer so it's quite
easy to do in place. We can also use the separated out function
independently.
Neil Roberts [Fri, 29 Jan 2010 12:19:42 +0000 (12:19 +0000)]
cogl-atlas-texture: Use a single atlas for both RGB and RGBA textures
The internal format of the atlas texture is still set to the
appropriate format so Cogl will disable blending for textures that are
intended to be RGB. This should end up ignoring the alpha channel from
the texture in the atlas. This makes the code slightly easier to
maintain and should also improve the chances of batching.
Emmanuele Bassi [Mon, 1 Feb 2010 12:18:10 +0000 (12:18 +0000)]
actor: Reword the allocation cycle warning
Since we're allowing allocation cycles saying that calling
queue_relayout() inside an allocation cycle "is not allowed" is kind of
confusing. We should say that "it is not recommended".
Emmanuele Bassi [Mon, 1 Feb 2010 11:26:56 +0000 (11:26 +0000)]
Merge branch 'device-manager'
* device-manager: (37 commits)
x11: Re-enable XI1 extension keyboards
x11: Always handle core device events before XI events
docs: Documentation fixes for DeviceManager
device-manager: Fix the signals definition
docs: Add sections for InputDevice and DeviceManager
docs: Add clutter_input_device_get_device_name()
tests: Print out the device details on motion
Always register core devices
device: Remove unused is_default member
win32: Experimental implementation of device support
tests: Print the device name, as well as its Id
x11: Fill out the :name property of the InputDevices
device: Add the :name property to InputDevice
x11: Store core devices on the X11 Backend singleton
device: Unset the cursor actor when leaving the stage
device: Add pointer actor getter
x11: Discard the LeaveNotify for off-stage ButtonRelease
device: Do not overwrite the stage for an InputDevice
event: Off-stage button releases have a click count of 1
event: Scroll events do not have click count
...
Alejandro Piñeiro [Mon, 25 Jan 2010 15:13:58 +0000 (16:13 +0100)]
Fix problems with "position" and "selection-bound" change notification
Added a "selection-bound" notify on clutter_text_clear_selection as it
changes the value.
Added utility function clutter_text_set_positions, in order to
change both cursor position and selection bound inside a
g_object_[freeze/thaw]_notify block
Added g_object_[freeze/thaw]_notify in other functions that changes
both cursor position and selection bound
Solves http://bugzilla.openedhand.com/show_bug.cgi?id=1955
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>
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.
Emmanuele Bassi [Fri, 29 Jan 2010 09:31:13 +0000 (09:31 +0000)]
docs: Update the configure switches in the README
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.