1
0
Fork 0
Commit graph

3845 commits

Author SHA1 Message Date
Neil Roberts
65d7a113ee cogl: Use separate materials for set_source_color and texture
Previously cogl_set_source_color and cogl_set_source_texture modified
a single global material. If an application then mixes using
cogl_set_source_color and texture then the material will constantly
need a new ARBfp program because the numbers of layers alternates
between 0 and 1. This patch just adds a second global material that is
only used for cogl_set_source_texture. I think it would still end up
flushing the journal if cogl_set_source_texture is used with multiple
different textures but at least it should avoid a recompile unless the
texture target also changes. It might be nice to somehow attach a
material to the CoglTexture for use with cogl_set_source_texture but
it would be difficult to implement this without creating a circular
reference.
2010-10-27 15:07:03 +01:00
Robert Bragg
89cedc7800 Move IndicesType and VerticesMode typedefs to cogl-types.h
This moves the CoglIndicesType and CoglVerticesMode typedefs from
cogl-vertex-buffer.h to cogl-types.h so they can be shared with the
anticipated cogl vertex attribute API.
2010-10-26 17:25:33 +01:00
Robert Bragg
e3bf83eab5 buffer: BufferBindTarget + BufferUsageHint enum renaming
This renames the BufferBindTarget + BufferUsageHint enums to match the
anticipated new APIs for "index arrays" and "vertex arrays" as opposed
to using the terms "vertices" or "indices".
2010-10-26 17:25:27 +01:00
Robert Bragg
9efe7ca5bc buffer: warn if (offset + size) > buffer->size
previously we would silently bail out if the given offset + data size
would overflow the buffer size. Now we use g_return_val_if_fail so we
get a warning if we hit this case.
2010-10-26 16:40:54 +01:00
Robert Bragg
b2963b4eef pixel-array: Remove some benign variables
There were some completely unused static global variables declared in
cogl-pixel-array.c which this patch removes.
2010-10-26 16:16:50 +01:00
Robert Bragg
902c18ad87 pixel-array: Remove flags member and flag macros
There are no flags associated with pixel-arrays so we don't need the
flags member or flag macros.
2010-10-26 16:16:40 +01:00
Robert Bragg
1c8b355bbb buffer: Add a store_created bit field member
This adds a store_created bit field to CoglBuffer so we know if the
underlying buffer has been allocated yet. Previously the code was trying
to do something really wrong by accidentally using the
COGL_PIXEL_ARRAY_FLAG_IS_SET macro (note "PIXEL_ARRAY") and what is more
odd was the declaration of a CoglPixelArray *pixel_array in
cogl-buffer.c which the buffer was being cast too before calling using
the macro. Probably this was the fall-out of some previous code
re-factoring.
2010-10-26 16:16:29 +01:00
Robert Bragg
d5188c26b6 buffer: remove flag macros
All the macros get used for are to |= (a new flag bit), &= ~(a flag bit)
or use the & operator to test if a flag bit is set. I haven't found the
code more readable with these macros, but several times now I've felt
the need to double check if these macros do anything else behind the
hood or I've forgotten what flags are available so I've had to go to the
macro definition to see what the full enum names are for the flags (the
macros use symbol concatenation) so I can search for the definition of
all the flags. It turns out they are defined next to the macro so you
don't have to search far, but without the macro that wouldn't have been
necessary.

The more common use of the _IS_SET macro is actually more concise
expanded and imho since it doesn't hide anything in a separate header
file the code is more readable without the macro.
2010-10-26 13:21:11 +01:00
Robert Bragg
bc3a26d035 material: Adds _cogl_material_get_layer_texture
This is a counter part for _cogl_material_layer_get_texture which takes
a layer index instead of a direct CoglMaterialLayer pointer. The aim is
to phase out code that directly iterates the internal layer pointers of
a material since the layer pointers can change if any property of any
layer is changed making direct layer pointers very fragile.
2010-10-26 13:06:54 +01:00
Robert Bragg
0288ba3911 material: add internal layer filter getters
This adds internal _cogl_material_get_layer_filters and
_cogl_material_get_layer_{min,mag}_filter functions which can be used to
query the filters associated with a layer using a layer_index, as
opposed to a layer pointer. Accessing layer pointers is considered
deprecated so we need to provide layer_index based replacements.
2010-10-26 13:04:05 +01:00
Robert Bragg
6fd26630ba material: Adds missing get_layer_wrap_mode_xyz prototypes
This adds missing getter function prototypes for
cogl_material_get_layer_wrap_mode_{s,t,p}
2010-10-26 13:02:23 +01:00
Robert Bragg
32ae904d81 vertex-buffer: remove the unstrided CBO type
When we come to submitting the users given attributes we sort them into
different types of buffers. Previously we had three types; strided,
unstrided and multi-pack. Really though unstrided was just a limited
form of multi-pack buffer and didn't imply any hind of special
optimization so this patch consolidates some code by reducing to just
two types; strided and multi-pack.
2010-10-26 12:38:15 +01:00
Robert Bragg
94e0619785 material: Adds _cogl_material_pre_paint_for_layer
This is a counter part for _cogl_material_layer_pre_paint which takes a
layer index instead of a direct CoglMaterialLayer pointer. The aim is to
phase out code that directly iterates the internal layer pointers of a
material since the layer pointers can change if any property of any
layer is changed making direct layer pointers very fragile.
2010-10-26 12:17:27 +01:00
Robert Bragg
701a693661 cogl: Adds {push,pop,get}_source functions
This exposes the idea of a stack of source materials instead of just
having a single current material. This allows the writing of orthogonal
code that can change the current source material and restore it to its
previous state. It also allows the implementation of new composite
primitives that may want to validate the current source material and
possibly make override changes in a derived material.
2010-10-26 12:08:20 +01:00
Emmanuele Bassi
bf6c635e9d Merge branch 'private-cleanup'
* private-cleanup:
  Add copyright notices
  Clean up clutter-private.h/6
  Clean up clutter-private.h/5
  Clean up clutter-private.h/4
  Clean up clutter-private.h/3
  Clean up clutter-private.h/2
  Clean up clutter-private.h/1
2010-10-25 23:44:53 +01:00
Chris Lord
cb7d2943ea state: Correct the documentation
Correct the argument order and replace all occurrences of
clutter_state_change() with the appropriate clutter_state_set_state() or
clutter_state_warp_to_state().
2010-10-25 17:21:20 +01:00
Chris Lord
bfc1583d76 state: Fix warping to the current state during transitions
If you warp to a state, it should be immediately set. Check if the
animation is in progress when warping to a state and don't short-circuit
in the already-set check if we're not animating.
2010-10-25 17:21:20 +01:00
Chris Lord
35c35de55c state: Handle setting keys for the current target state
Add special behaviour when you set the key of the current target state:
- If the state is transitioning, add/modify the interval so that the new
  key transitions from the current time (taking into account pre-delay) to
  its target final property
- If the state is set but has already finished animating/was warped to,
  set the property immediately
2010-10-25 17:21:20 +01:00
Chris Lord
73dcbedc80 state: Fix crasher when removing the last key of a transitioning state
If ClutterState is in the middle of a transition and you remove all the
keys from the target state, the target state will be destroyed without
stopping the animation/unsetting the target state. This caused an invalid
memory access.
2010-10-25 17:21:20 +01:00
Chris Lord
5700b34b9c state: Allow setting a NULL state
Allow setting a %NULL state. This has the effect of unsetting the current
state and stopping all animation. This allows you to, for example, start
a state transition, set the state to NULL, alter the state transition
and then resume it again, by just setting it.
2010-10-25 17:21:20 +01:00
Emmanuele Bassi
ef6b46d826 Merge branch 'wip/path-constraint'
* wip/path-constraint:
  docs: Add PathConstraint
  tests: Add a PathConstraint interactive test
  Add ClutterPathConstraint
  actor-box: Add setters for origin and size
2010-10-25 17:09:46 +01:00
Emmanuele Bassi
f6ab7eccd9 docs: Add PathConstraint 2010-10-25 16:09:40 +01:00
Emmanuele Bassi
6b2cbb9908 Add ClutterPathConstraint
ClutterPathConstraint is a simple Constraint implementation that
modifies the allocation of the Actor to which is has been applied using
a progress value and a ClutterPath.
2010-10-25 15:46:04 +01:00
Emmanuele Bassi
3f6ec0ba5a actor-box: Add setters for origin and size 2010-10-25 15:45:35 +01:00
Neil Roberts
6da18b6e4f win32: Fix clutter_win32_disable_event_retrieval
There was previously a flag that gets set when this function was
called but nothing checked it so the function effectively did
nothing. Also the flag was a member of the backend struct but this
can't be used because the function should be called before
clutter_init so the backend is not ready yet. This patch makes the
event disabling work more like the X11 backend and set a global
variable instead.
2010-10-25 13:19:18 +01:00
Ole André Vadla Ravnås
e6099cdd4b win32: Use _clutter_actor_rerealize() like X11 backend does
http://bugzilla.clutter-project.org/show_bug.cgi?id=1654
2010-10-25 13:19:18 +01:00
Neil Roberts
e66c679e84 win32: Add a public clutter_win32_handle_event function
This function handles a single windows message. The idea is that it
could be used by clutter-gtk to forward on events from a
GdkEventFilter. The function replaces the old message_translate()
function. That function didn't translate the event anymore anyway and
instead it could generate multiple events so
clutter_win32_handle_event seems like a more appropriate name. The
function returns TRUE or FALSE depending on whether the event was
completely handled instead of setting call_window_proc.
2010-10-25 13:19:17 +01:00
Neil Roberts
52744c0d9d clutter-stage: Set the Cogl framebuffer size after allocating
When handling an allocation on the stage, Clutter uses the oppurtunity
to inform Cogl of the new size of the framebuffer so that it can
handle the viewport correctly. It queries the size of the window
implementation using a backend virtual function. However it was doing
this before letting the backend handle the allocation so on Win32 it
would end up using the previous framebuffer size. This wasn't
affecting the X11 backend because in that case the resizes are
asynchronous so setting the stage size causes one allocation which
ends up sending a window size request. Eventually a ConfigureNotify is
received which causes the size of the stage to be set again and
another allocation is fired meaning the framebuffer size will be set
again this time with the correct size. In Win32 the resizes are
synchronous so we don't have this second allocation.
2010-10-25 13:19:17 +01:00
Neil Roberts
cc7977988c cogl-context-winsys: Avoid zero-length arrays
When compiling for non-glx platforms the winsys feature data array
ends up empty. Empty arrays cause problems for MSVC so this patch adds
a stub entry so that the array always has at least one entry.

Based on a patch by Ole André Vadla Ravnås
2010-10-25 13:18:25 +01:00
Neil Roberts
f1752ff3ba Avoid mixing declarations and code
Mixing declarations and code causes problems for MSVC as it is a C99
feature so we should try to avoid it.
2010-10-25 13:18:25 +01:00
Neil Roberts
8e3674dcc1 Avoid variable length arrays in clutter-backend-x11
There was an array whose length was define by a static const int
variable. GCC seems to consider this a variable-length array so it
will cause warnings now that -Wvla is enabled. We might as well make
this constant a #define instead to avoid the warning.
2010-10-25 13:18:25 +01:00
Giovanni Campagna
164af55a6e Avoid warnings on ClutterClone with a NULL source
clutter_clone_apply_transform should check the source before calling
methods on it, else criticals will be emitted.

http://bugzilla.clutter-project.org/show_bug.cgi?id=2381
2010-10-25 12:36:00 +01:00
Ole André Vadla Ravnås
276acf5854 binding-pool: Use the correct marshaller 2010-10-25 00:39:13 +01:00
Ole André Vadla Ravnås
c792431538 interval: Remember to chain up to parent in finalize() 2010-10-25 00:31:36 +01:00
Neil Roberts
d5634e37a2 cogl-texture-2d-sliced: Use the other backends for the slices
Instead of directly manipulating GL textures itself,
CoglTexture2DSliced now works in terms of CoglHandles. It creates the
texture slices using cogl_texture_new_with_size which should always
end up creating a CoglTexture2D because the size should fit. This
allows us to avoid replicating some code such as the first pixel
mipmap tracking and it better enforces the separation that each
texture backend is the only place that contains code dealing with each
texture target.
2010-10-22 12:19:04 +01:00
Neil Roberts
61f2f1c024 Support foreign textures in the texture-2d and rectangle backends
This adds two new internal functions to create a foreign texture for
the texture 2d and rectangle backends. cogl_texture_new_from_foreign
will now use one of these backends directly if there is no waste
instead of always using the sliced texture backend.
2010-10-22 12:19:02 +01:00
Emmanuele Bassi
cf46c8197e Add copyright notices 2010-10-21 13:13:00 +01:00
Emmanuele Bassi
46c597a1f6 Clean up clutter-private.h/6
Move all Actor private API to a separate file.
2010-10-21 12:22:17 +01:00
Emmanuele Bassi
cf3a29f224 Clean up clutter-private.h/5
Move PaintVolume private API to a separate header.
2010-10-21 12:22:17 +01:00
Emmanuele Bassi
43edfc9400 Clean up clutter-private.h/4
Move the private Backend API to a separate header.

This also allows us to finally move the class vtable and instance
structure to a separate file and plug the visibility hole that left
the Backend class bare for everyone to poke into.
2010-10-21 12:22:17 +01:00
Emmanuele Bassi
8613013ab0 Clean up clutter-private.h/3
Move Stage private API to a separate header.
2010-10-21 11:33:26 +01:00
Emmanuele Bassi
999c063784 Clean up clutter-private.h/2
Move StageManager private API to a different header.
2010-10-21 11:30:19 +01:00
Emmanuele Bassi
c1771d152e Clean up clutter-private.h/1
Move DeviceManager/InputDevice private API to a different header.
2010-10-21 10:54:14 +01:00
Emmanuele Bassi
68156c24c1 build: Remove unused Makefile.am
We switched to a non-recursive layout, hence we don't need Makefile.am
in the osx/ and fruity/ sub-directories.
2010-10-19 17:48:15 +01:00
Emmanuele Bassi
dd2f55c6f6 x11: Protect XComposite API calls
Since we allow compiling Clutter without the XComposite extension
available, we need to protect the calls to the XComposite API with
the guards provided by the configure script.
2010-10-19 10:43:50 +01:00
Emmanuele Bassi
21eb49098a script: Fix the memory management
Currently, the memory management in ClutterScript is overly complicated.
The basic design tenet should be:

  - ClutterScript owns a reference on every object it creates

This allows the Script instance to reliably handle the lifetime of the
instances from creation to disposal.

In case of unmerge, the Script instance should destroy any Actor
instance, except for the Stage, and release the reference it owns. The
Stage is special because it's really owned by Clutter itself, and it
should be destroyed explicitly.

When disposing the Script itself, it should just release the reference;
any parented actor, or any InitiallyUnowned instance, will then be
managed by the parent object, as they should, while every GObject
instance will go away, as documented.

This commit is based on a patch by:

  Henrik Hedberg <hhedberg@innologies.fi>

http://bugzilla.clutter-project.org/show_bug.cgi?id=2316
2010-10-19 01:42:19 +01:00
Emmanuele Bassi
20a359cc53 debug: Do not use '&' in the messages
Use ':' as a separator between G_STRLOC and the debug message, like we
do for warnings.
2010-10-19 01:42:19 +01:00
Emmanuele Bassi
78d4073f8e Remove unused variables 2010-10-19 01:42:19 +01:00
Damien Lespiau
32270730bd build: Fix EGL/CEX100 build with GLES2
Some headers files have been renamed or removed and the gles(2) did not
compile anymore, fix that.
2010-10-18 16:08:47 +01:00
Emmanuele Bassi
0f613ea134 cairo-texture: Allow overriding the surface creation
By using a new signal, ::create-surface (width, height), it should be
possible for third party code and sub-classes to override the default
surface creation code in CairoSurface.

This commit takes a bit of the patch from:

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

which cleans up CairoTexture; the idea, mutuated from that bug, is that
the CairoTexture actor checks whether the surface it has it's an image
one, and in that case it uses a Cogl texture as the backing store. In
case the surface is not an image one we assume that the surface itself
has some way of updating the GL state and flush the surface.
2010-10-18 11:26:45 +01:00
Emmanuele Bassi
050e775da2 Move more classes to install_properties() 2010-10-18 11:26:45 +01:00
Emmanuele Bassi
8429aa8d75 Remove unnecessary GLib version checks
We now depend on a newer version of GLib than those checks tested for.
2010-10-18 11:26:45 +01:00
Emmanuele Bassi
7dd09e2186 Use G_DEFINE_BOXED_TYPE for all boxed types
We actually need a couple more macros for registering GValue
transformation functions. Those should be added to upstream
GLib.
2010-10-18 11:26:45 +01:00
Emmanuele Bassi
09a830d294 Remove conditional wrappers for property installation/notification
For the time being, just keep the #define's.
2010-10-18 11:26:45 +01:00
Emmanuele Bassi
9caf11f2d8 Use G_DEFINE_INTERFACE
GObject provides us with a nice, safe macro for defining interface
types.
2010-10-18 11:26:44 +01:00
Emmanuele Bassi
2b4ee9ab54 actor: Add more checks to the redraw queue 2010-10-15 16:05:44 +01:00
Emmanuele Bassi
56c89bd86b osx: Fix glib.h include path
The fix for removing glib/gmain.h introduced the wrong path for glib.h.
2010-10-15 12:40:43 +01:00
Roland Peffer
d842619755 osx: Add button mask to the modifier state translation
The modifier state translation is missing the CLUTTER_BUTTON*_MASK.

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

Signed-off-by: Emmanuele Bassi <ebassi@linux.intel.com>
2010-10-14 18:23:02 +01:00
Kristian Høgsberg
134ce072e7 The amazing lazy-copy-back-repaint-page-flip
Always use pageflipping, but avoid full repaint by copying back dirty
regions from front to back.  Additionally, we dealy copying back until
we're ready to paint the new frame, so we can avoid copying areas that
will be repainted anyway.

This is the least amount of copying per frame we can get away with at all
and at the same time we don't have to worry about stalling the GPU on
synchronized blits since we always pageflip.
2010-10-14 16:23:05 +01:00
Kristian Høgsberg
cb5582c4ab Add wayland backend
This adds a clutter backend for running under the wayland window system.
Initial cogl framebuffer integration by Robert Bragg.
2010-10-14 16:23:05 +01:00
Kristian Høgsberg
a7cf98ebfc Initialize color masks lazily
When we don't use a window system drawable, we can't query the color
masks at context initialization time.  Do it lazily so we're sure to have
a current context with a valid framebuffer.
2010-10-14 16:23:05 +01:00
Robert Bragg
f456116c18 When unparenting an actor, remove queued redraws for all descendants
We need to make sure that redraws queued for actors on a stage are for
actors actually in the stage. So in clutter_actor_unparent() descend
through the children and remove redraws. Just removing the actor itself
isn't good enough since an entire hierarchy can be removed from the
stage without breaking it up into individual actors.

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

This is based on an original patch from Owen Taylor who debugged the
root cause of this bug; thanks.
2010-10-14 16:19:55 +01:00
Robert Bragg
07f2dba7e2 stage: handle unclipped redraw following clipped
In the case that an unclipped redraw of an actor is queued after a
clipped we should update any existing ClutterStageQueueRedrawEntry
so entry->has_clip = FALSE and free the previous clip.
2010-10-14 15:29:33 +01:00
Emmanuele Bassi
e6418a9dec constraints: Remove unused variable 2010-10-12 15:44:57 +01:00
Emmanuele Bassi
4e724aed46 bind-constraint: Use ::queue-relayout
Instead of using the allocation-changed signal, use the queue-relayout
signal on the source to queue a relayout on the actor to which the
BindConstraint has been attached to.

The ::allocation-changed signal is not always enough, given that a
BindConstraint can use the position as well as the size of an actor to
drive the allocation of another; in this regard, it's much similar
to a ClutterClone, which requires a notification on every change, even
potential, and not just real ones, given the short-circuiting done
inside ClutterActor.
2010-10-12 14:09:47 +01:00
Emmanuele Bassi
5c82b2551c constraints: Do not check for :enabled
ClutterActor will do it for us.
2010-10-12 14:09:17 +01:00
Emmanuele Bassi
3f27afde24 actor: Use an explicit check for NULL
Follow the coding style, and don't use the implicit C boolean
equivalence for NULL pointers.
2010-10-12 14:08:07 +01:00
Emmanuele Bassi
3b72fdb20c actor: Queue a relayout when adding/removing constraints
Constraints change the way an actor is allocated; this warrants a
relayout.
2010-10-12 14:07:27 +01:00
Emmanuele Bassi
91a9a355c3 actor: Check CluterActorMeta:enabled
Instead of delegating the check for the ActorMeta:enabled property to
the sub-classes of ClutterActorMeta, ClutterActor can do the check prior
to using the ClutterActorMeta instances.
2010-10-12 14:07:17 +01:00
Emmanuele Bassi
3f6b82c9c9 actor: Add debugging note for allocation changes 2010-10-12 14:04:05 +01:00
Emmanuele Bassi
89a389cd2b actor-box: Split out ActorBox into its own file
clutter-actor.c is getting way too large, so splitting it up wherever
possible makes sense.
2010-10-11 15:57:22 +01:00
Emmanuele Bassi
7a54bdc65d vertex: Register progress function
This allows animating properties storing a ClutterVertex.
2010-10-11 15:52:50 +01:00
Emmanuele Bassi
4931802fee geometry: Register a progress function
This allows animating properties storing a ClutterGeometry.
2010-10-11 15:44:09 +01:00
Emmanuele Bassi
a5fc90d4d9 actor-box: Register a progress function
So that we can animate properties storing ClutterActorBox.
2010-10-11 15:39:19 +01:00
Emmanuele Bassi
2f21c851ea script: Fix annotation for get_object()'s return value 2010-10-11 15:39:19 +01:00
Emmanuele Bassi
dcf2662616 interval: Remove special casing for ClutterColor
ClutterColor registers a progress function on type initialization, so we
don't need to special case it any more.
2010-10-11 15:39:19 +01:00
Emmanuele Bassi
d5376bf317 color: Add Color.interpolate() method
The interpolate() method does what it says on the tin: it interpolates
between two colors using the given factor.

ClutterColor uses it to register a progress function for Intervals.
2010-10-11 15:39:19 +01:00
Neil Roberts
7e112472b5 cogl-texture-2d-sliced: Use the smallest possible waste
When picking a size for the last slice in a texture, Cogl would always
pick the biggest power of two size that doesn't create too much
waste and is less than or equal to the previous slice size. However
this can end up creating a texture that is bigger than needed if there
is a smaller power of two.

For example, if the maximum waste is 127 (the current default) and we
try to create a texture that is 257 pixels wide it will decide that
the next power of two (512) is too much waste (255) so it will create
the first slice at 256 pixels wide. Then we only have 1 pixel left to
allocate but Cogl would pick the next smaller size that has a small
enough waste which is 128. But of course 1 is already a power of two
so that's redundantly oversized by 127.

This patch fixes it so that whenever it finds a size that would be big
enough, instead of using exactly that it picks the next power of two
up from the size we need to fill.

http://bugzilla.clutter-project.org/show_bug.cgi?id=2355
2010-10-11 14:40:04 +01:00
Emmanuele Bassi
1f106b35a9 Whitespace alignment fixes 2010-10-11 13:52:09 +01:00
Emmanuele Bassi
68d656c61b paint-volume: Add arguments checks
In some cases we access the arguments in public functions without, or
prior to checking the arguments.
2010-10-11 13:51:12 +01:00
Owen W. Taylor
8089af3c1b ClutterClone: Handle clone_source == NULL for get_paint_volume()
It's valid to have a ClutterClone without a clone source; in this
case the paint volume is empty.

http://bugzilla.clutter-project.org/show_bug.cgi?id=2360
2010-10-11 13:43:39 +01:00
Emmanuele Bassi
e005892534 clone: Remove unnecessary G_UNLIKELY macros
A Clone:source property might be NULL, and we should not penalize
performance when we can just bail out early, because that would kind of
defeat the point.
2010-10-11 13:32:26 +01:00
Emmanuele Bassi
f8af2da4c8 osx: Compilation fixes
Replace deprecated symbols with the correct ones.
2010-10-10 09:31:55 +01:00
Emmanuele Bassi
981fed1f63 box-layout: Plug a memory leak
Similar to commit 4724be167f for
TableLayout.

http://bugzilla.clutter-project.org/show_bug.cgi?id=2358
2010-10-08 13:29:49 +01:00
Neil Roberts
4724be167f Plug a memory leak in clutter-table-layout
Whenever the allocation is changed on a child of a ClutterTableLayout
and animations are not in effect then it would store a copy of the
allocation in the child meta data. However it was not freeing the old
copy of the allocation so it would end up with a small leak.

Instead of just changing it to free the old value this patch makes it
store the allocation inline in the meta data struct because it seems
that the size of an actor box is already quite small compared to the
size of the meta data struct so it is probably not worth having a
separate allocation for it. To detect the case when there has not yet
been an allocation a separate boolean is used instead of storing NULL.

http://bugzilla.clutter-project.org/show_bug.cgi?id=2358
2010-10-08 12:11:39 +01:00
Damien Lespiau
155bde2465 texture: Fix the typos in the blurbs and make them not end with '.'
All the nifty things you discover when translating strings not exposed
to anyone. First the clutter-wide record of the number of typos in one
string. Second, ClutterTexture happened to have the only property blurbs
ending with a '.', remove them.
2010-10-05 08:39:40 +01:00
Damien Lespiau
2d56ed637c text: Rename the nick of the position property "Cursor Position"
the "position" property of ClutterText is really the position of the
cursor. Rename the nick accordingly not to confuse it with the position
of the actor itself and be consistent with all the other cursor-related
properties.
2010-10-05 08:25:06 +01:00
Damien Lespiau
a13182c740 cogl: Use Cogl (not COGL) consistently
If I remember correctly, Robert wants to name Cogl, Cogl (not COGL) so
start by having a consistent naming in the code.
2010-10-05 08:03:19 +01:00
Damien Lespiau
24577a0538 bin-layer: Fix the property blurbs
The descriptions for the 'y-align' and 'x-align' properties talk about a
layer and a layer manager. It seems that these properties are the
alignement factors relative to the BinLayout, so document them
accordingly.
2010-10-05 07:50:52 +01:00
Damien Lespiau
9ae1729f37 box-layout: Fix missing spaces in the blurbs of vertical and homogeneous 2010-10-04 18:52:57 +01:00
Damien Lespiau
9258f9bebb deform-effect: Fix Horiontal/Horizontal typo 2010-10-04 17:21:15 +01:00
Emmanuele Bassi
6af0ee2cbe cogl-x11: Trap glXDestroyPixmap()
There are ordering issues in the pixmap destruction with current and
past X11 server, Mesa and dri2. Under some circumstances, an X pixmap
might be destroyed with the GLX pixmap still referencing it, and thus
the X server will decide to destroy the GLX pixmap as well; then, when
Cogl tries to destroy the GLX pixmap, it gets BadDrawable errors.

Clutter 1.2 used to trap + sync all calls to glXDestroyPixmap(), but
then we assumed that the ordering issue had been solved. So, we're back
to square 1.

I left a Big Fat Comment™ right above the glXDestroyPixmap() call
referencing the bug and the reasoning behind the trap, so that we don't
go and remove it in the future without checking that the issue has been
in fact solved.

http://bugzilla.clutter-project.org/show_bug.cgi?id=2324
2010-10-04 14:26:23 +01:00
Alejandro Piñeiro
f5aeabadd5 Fixing cally.pc.in and moving include headers to previous directory
After commit 8dd8fbdb some errors appear if you try work directly
against cally:

 * cally.pc.in removed some elements. After install clutter, doing
   pkg-config --cflags cally-1.0
   fails due missing winsys

 * cally headers were moved from clutter-1.0/cally to
   clutter-1.0/clutter/cally.  Applications using it (yes I know,
   nobody is officially using it) would require to:
    * Change their include.
    * Add directly a dependency to cally, in order to use the cally.pc
      file with the correct directory include.

Note: Take into account that accessibility support still works (ie:
clutter_get_accessibility_enabled). This bug only prevents
applications to work directly against cally (ie: create a CallyActor
subclass)

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

Signed-off-by: Emmanuele Bassi <ebassi@linux.intel.com>
2010-10-04 13:05:02 +01:00
Emmanuele Bassi
d3b6dd5ec7 effect: Fix up the class ABI
Landing the paint-box branch accidentally added two slots to the
ClutterEffectClass vtable, plus the get_paint_volume() function
pointer. This is an ABI break from 1.4.
2010-10-04 11:30:32 +01:00
Emmanuele Bassi
e1a1050a39 actor-box: Constify arguments for union
The input arguments for clutter_actor_box_union() should be constified,
since they will not be modified by the function.
2010-10-04 11:27:16 +01:00
Emmanuele Bassi
45b6d7d47a docs: Fix the annotations of ActorClass 2010-10-04 11:26:46 +01:00
Emmanuele Bassi
bdb24701f0 build: Add -xobjective-c to the fruity backend section
Like we do for the Quartz backend, we should turn on the -xobjective-c
compiler flag for the Fruity backend.

This does not mean that the backend actually works.
2010-10-04 10:52:36 +01:00
Emmanuele Bassi
0cf2f50ba6 build: Remove redundant EXTRA_DISTs
The files for the backend that we conditionally compile are
automatically added to the dist process by automake.
2010-10-04 09:09:13 +01:00
Emmanuele Bassi
a29623e838 build: Unconditionally add GLES2 shaders to EXTRA_DIST 2010-10-04 08:57:29 +01:00
Emmanuele Bassi
939333b4f2 build: Dist every backend file
All backend files should be present in the tarball generated by `make
dist`, to allow building Clutter on different platforms.
2010-10-03 16:10:44 +01:00