Robert Bragg [Fri, 5 Feb 2010 16:32:19 +0000 (16:32 +0000)]
cogl: deprecates cogl_check_extension
OpenGL is an implementation detail for Cogl so it's not appropriate to
expose OpenGL extensions through the Cogl API.
Note: Clutter is currently still using this API, because it is still
doing raw GL calls in ClutterGLXTexturePixmap, so this introduces a
couple of (legitimate) build warnings while compiling Clutter.
Robert Bragg [Tue, 9 Feb 2010 19:34:32 +0000 (19:34 +0000)]
never presume queuing redraws on invisible actors is redundant
This replaces code like this:
if (CLUTTER_ACTOR_IS_VISIBLE (self))
clutter_actor_queue_redraw (self);
with:
clutter_actor_queue_redraw (self);
clutter_actor_queue_redraw internally knows what can be optimized when
the actor is not visible, but it also knows that the queue_redraw signal
must always be sent in case a ClutterClone is cloning a hidden actor.
Robert Bragg [Tue, 9 Feb 2010 19:19:44 +0000 (19:19 +0000)]
box: port a ClutterGroup::foreach fix to ClutterBox
ClutterGroup::foreach was recently changed (ref:
ce030a3fce) to use
g_list_foreach() to iterate the children instead of manually iterating
the list so it would safely handle calls like:
clutter_container_foreach (container, clutter_actor_destroy);
(In this example clutter_actor_destroy will result in the current
list item being iterated being freed.)
Robert Bragg [Tue, 9 Feb 2010 19:06:59 +0000 (19:06 +0000)]
box: Adds missing copyright header
Adds a Copyright (C) 2009,2010 Intel Corporation header
Robert Bragg [Tue, 9 Feb 2010 18:54:28 +0000 (18:54 +0000)]
group: make it comparable to ClutterBox
There is a lot of duplication between ClutterGroup and ClutterBox so
this makes the two files diff-able so that new fixes can easily be
ported to both and bug fixes missing in one or the other can be spotted
more easily. This doesn't change the behaviour of either actor; it's
really just a shuffle around of code and normalizes the coding style to
make the files comparable.
This has already uncovered one bug in ClutterBox, and also highlights
a bug in ClutterGroup + many other actors:
1) ClutterGroup::real_foreach was recently changed to use
g_list_foreach instead of manually iterating the child list so it can
safely handle calls like:
clutter_container_foreach (container, clutter_actor_destroy);
ClutterBox is still manually iterating the list.
2) In ClutterGroup we guard _queue_redraw() calls like this:
if (CLUTTER_ACTOR_IS_VISIBLE (container))
clutter_actor_queue_redraw (CLUTTER_ACTOR (container));
In ClutterBox we don't:
I think ClutterBox is correct here because
clutter_actor_queue_redraw already optimizes the case where the
actor's not visible, but it also considers that the actor may be
cloned and so the guard in ClutterGroup could break clones. This
actually highlights a wider clutter bug since the same kinds of
guards can be found in all other clutter actors.
Emmanuele Bassi [Fri, 12 Feb 2010 11:38:47 +0000 (11:38 +0000)]
docs: Update the backend HACKING file
Clarify the Backend::create_context() vfunc role, and the
Stage::realize() vfunc with regards to creating the GL/GLES
context.
Neil Roberts [Thu, 11 Feb 2010 14:20:48 +0000 (14:20 +0000)]
cogl: Add a fallback for when the signbit macro is missing
The signbit macro is defined in C99 so it should be available but some
versions of GCC don't appear to define it by default. If it's not
available we can use a hack to test the bit directly.
Emmanuele Bassi [Wed, 10 Feb 2010 17:20:31 +0000 (17:20 +0000)]
Do a sanity check on _clutter_do_pick() arguments
We should check that the passed ClutterStage pointer is indeed: a) still
valid and b) a Stage.
Emmanuele Bassi [Wed, 10 Feb 2010 17:12:27 +0000 (17:12 +0000)]
input-device: Do not pick() on NULL stages
If the stage associated to the InputDevice is not set we should
short-circuit out and return NULL. This will result in a pick()
done on the event's stage - if applicable.
http://bugzilla.moblin.org/show_bug.cgi?id=9602
Emmanuele Bassi [Wed, 10 Feb 2010 15:38:41 +0000 (15:38 +0000)]
text: Bump up the preferred height
Instead of returning a sub-pixel height round up the preferred height to
the nearest integral value that is not less than the size reported by
Pango, once converted in pixels.
Emmanuele Bassi [Wed, 10 Feb 2010 15:38:07 +0000 (15:38 +0000)]
test-text-field: Tone down the border
Use a low opacity for the text field border.
Emmanuele Bassi [Wed, 10 Feb 2010 15:37:26 +0000 (15:37 +0000)]
test-text-field: Use ActorBox methods for the border
Clamp to pixel and use get_size() when painting the border of the text
field.
Robert Bragg [Wed, 10 Feb 2010 11:57:58 +0000 (11:57 +0000)]
uprof: make the Redrawing timer a child of the Master Clock
Previously it was a child of the Mainloop, but it's more closely
a child of the Master Clock.
Robert Bragg [Wed, 10 Feb 2010 12:18:41 +0000 (12:18 +0000)]
backend-glx: Fix glXQueryVersion test
This fixes some backwards logic for asserting that we have a GLX major
version == 1 and a minor version >= 2. (NB: Although we technically
depend on GLX 1.3 features, we still have to support drivers that report
GLX 1.2 because there are a lot of mesa drivers out there incorrectly
report GLX 1.2 even though they export extensions that depend on GLX
1.3)
Neil Roberts [Wed, 10 Feb 2010 12:41:09 +0000 (12:41 +0000)]
cogl-material: Layers are not equal if the filters aren't equal
A material layer can not be considered equal if it is using different
texture filtering modes. This was causing problems where rectangles
with different filters would end up batched together and then rendered
with the wrong filter mode.
Emmanuele Bassi [Wed, 10 Feb 2010 10:58:14 +0000 (10:58 +0000)]
build: Tweak internal defines for building Clutter
When building Clutter we should:
• disable Cogl deprecated API;
• enable experimental API.
Robert Bragg [Wed, 20 Jan 2010 18:53:36 +0000 (18:53 +0000)]
debug: Adds CLUTTER_DEBUG=disable-swap-events option
This allows us to forcibly disable the use of the GLX_INTEL_swap_events
extension for testing or debugging purposes.
Robert Bragg [Thu, 12 Nov 2009 20:37:01 +0000 (20:37 +0000)]
glx backend: Adds support for GLX_INTEL_swap_event
If your OpenGL driver supports GLX_INTEL_swap_event that means when
glXSwapBuffers is called it returns immediatly and an XEvent is sent when
the actual swap has finished.
Clutter can use the events that notify swap completion as a means to
throttle rendering in the master clock without blocking the CPU and so it
should help improve the performance of CPU bound applications.
Robert Bragg [Thu, 14 Jan 2010 14:03:23 +0000 (14:03 +0000)]
glx backend: when running with GLX 1.3 then create GLXWindows for stages
Some extensions only support GLX versions > 1.3 and may not support
old style X Windows as GLXDrawables, so we now create GLXWindows for
stages when possible.
Neil Roberts [Tue, 9 Feb 2010 18:33:09 +0000 (18:33 +0000)]
clutter-backend: Fix the error check in _clutter_backend_create_stage
Commit
d2bdd3cb62 fixed some compiler warnings but also broke the
ability to create a stage. Although not having warnings from the
compiler is nice, it is also nice to be able to create a stage so lets
not invert the meaning of the error check.
Emmanuele Bassi [Tue, 9 Feb 2010 17:07:08 +0000 (17:07 +0000)]
cogl: Move material_copy() out of the deprecated section
We strongly suggest people should be using cogl_material_copy(), but it
was hidden behind the deprecation guards.
Emmanuele Bassi [Tue, 9 Feb 2010 16:57:14 +0000 (16:57 +0000)]
Fix some compiler warnings
GCC complains that some variable might be used uninitialized.
Neil Roberts [Tue, 9 Feb 2010 16:30:28 +0000 (16:30 +0000)]
cogl-bitmap: Remove const from premult_alpha_last_four_pixels_sse2
The function modifies the pixels pointed by p in-place so the pointer
can not be constant. The compiler was accepting this because the
modification is done from inline assembler.
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.