Emmanuele Bassi [Thu, 9 Jun 2011 14:53:29 +0000 (15:53 +0100)]
Move some old doc files under doc/
ChangeLog.pre-git-import is useless since the Git log contains the
pre-Git history anyway.
AUTHORS is not really useful, as many more people have been committing
to Clutter for a while now.
Emmanuele Bassi [Thu, 9 Jun 2011 14:40:57 +0000 (15:40 +0100)]
docs: Fix up new symbols for the API reference
Emmanuele Bassi [Thu, 9 Jun 2011 14:40:26 +0000 (15:40 +0100)]
event: Add clutter_event_set_source() declaration
The function was defined but not declared in the header.
Emmanuele Bassi [Thu, 9 Jun 2011 14:28:39 +0000 (15:28 +0100)]
Fix deprecation guards for ClutterGLXTexturePixmap
Emmanuele Bassi [Thu, 9 Jun 2011 13:42:31 +0000 (14:42 +0100)]
test-bin-layout: Use the long-press signal on ClickAction
Emmanuele Bassi [Wed, 18 May 2011 10:21:58 +0000 (11:21 +0100)]
click-action: Add support for long press detection
A long press is a special form of click action; the default
implementation uses a single signal with multiple states: query, action
and cancel. On click we use the "query" state to check whether the
ClutterClickAction supports long presses; if the callback returns TRUE
then we install a timeout and we either emit the "activate" state when
the timeout expires or we emit the "cancel" state if the pointer leaves
the actor, or if the pointer moves outside a certain threshold. If the
long press reached the "activate" state then we skip the clicked signal
emission.
Emmanuele Bassi [Thu, 9 Jun 2011 13:33:17 +0000 (14:33 +0100)]
settings: Add the :long-press-duration
A property to control the minimum time that has to elapse before a press
is recognized as a long press. This will be used by ClutterClickAction,
but it can be shared across touch-based gestures.
Emmanuele Bassi [Tue, 7 Jun 2011 14:49:20 +0000 (15:49 +0100)]
Eliminate G_CONST_RETURN
The G_CONST_RETURN define in GLib is, and has always been, a bit fuzzy.
We always used it to conform to the platform, at least for public-facing
API.
At first I assumed it has something to do with brain-damaged compilers
or with weird platforms where const was not really supported; sadly,
it's something much, much worse: it's a define that can be toggled at
compile-time to remove const from the signature of public API. This is a
truly terrifying feature that I assume was added in the past century,
and whose inception clearly had something to do with massive doses of
absynthe and opium — because any other explanation would make the
existence of such a feature even worse than assuming drugs had anything
to do with it.
Anyway, and pleasing the gods, this dubious feature is being
removed/deprecated in GLib; see bug:
https://bugzilla.gnome.org/show_bug.cgi?id=644611
Before deprecation, though, we should just remove its usage from the
whole API. We should especially remove its usage from Cally's internals,
since there it never made sense in the first place.
Kjartan Maraas [Tue, 7 Jun 2011 14:46:55 +0000 (16:46 +0200)]
Added Norwegian bokmål translation
Kjartan Maraas [Tue, 7 Jun 2011 14:45:45 +0000 (16:45 +0200)]
Add Norwegian bokmål translation.
Matej Urbančič [Tue, 7 Jun 2011 13:45:45 +0000 (15:45 +0200)]
Updated Slovenian translation
Tomeu Vizoso [Wed, 18 May 2011 14:10:18 +0000 (16:10 +0200)]
Sync allocation in ClutterBoxLayout with the one in GtkBox
https://bugzilla.gnome.org/show_bug.cgi?id=650487
Signed-off-by: Emmanuele Bassi <ebassi@linux.intel.com>
Craig R. Hughes [Mon, 9 May 2011 16:39:55 +0000 (09:39 -0700)]
osx: Handle bare modifier keypresses
http://bugzilla.clutter-project.org/show_bug.cgi?id=2644
Emmanuele Bassi [Tue, 7 Jun 2011 13:34:19 +0000 (14:34 +0100)]
stage: Bail out of do_update() when no impl is set
If the Stage has been destroyed the StageWindow implementation is not
going to be available, but the IN_DESTRUCTION flag will have already
been cleared.
http://bugzilla.clutter-project.org/show_bug.cgi?id=2656
Emmanuele Bassi [Tue, 7 Jun 2011 13:25:17 +0000 (14:25 +0100)]
actor: Avoid queueing redraws during destruction
If an actor or the stage to which it belongs are being destroyed then
there is no point in queueing a redraw that will not be seen anyway.
Bailing out early also avoids the case in which a redraw is queued
during destruction wil cause redraw entries will be added to the Stage,
which will take references on it and cause the Stage never to be
finalized.
http://bugzilla.clutter-project.org/show_bug.cgi?id=2652
Emmanuele Bassi [Wed, 25 May 2011 15:23:08 +0000 (16:23 +0100)]
Deprecate ClutterShader
With the instantiatable ClutterShaderEffect, the only reason for
ClutterShader to exist is to make the ClutterActor::paint implementation
miserable.
Yes, ClutterShader doesn't use a FBO, so it's "more efficient" on
ClutterTextures. It's also generally wrong unless you know *exactly* how
the actor's pipeline is set up — something we cannot even guarantee
internally unless we start doing lame type checks.
Emmanuele Bassi [Wed, 25 May 2011 14:38:56 +0000 (15:38 +0100)]
test-constrains: Use a ShaderEffect
Demonstrate how to use a ShaderEffect instance.
Emmanuele Bassi [Wed, 25 May 2011 14:37:45 +0000 (15:37 +0100)]
shader-effect: Allow instantiating ShaderEffect
ClutterShaderEffect doesn't require to be sub-classed in order to be
useful. It is possible to just create an instance, set the source and
the uniforms, and attach it to an actor. This should effectively replace
ClutterShader for good.
Marek Černocký [Tue, 7 Jun 2011 09:38:01 +0000 (11:38 +0200)]
Updated Czech translation
Daniel Mustieles [Mon, 6 Jun 2011 20:23:32 +0000 (22:23 +0200)]
Updated Spanish translation
Alexandre Franke [Thu, 2 Jun 2011 18:56:22 +0000 (20:56 +0200)]
Fix typo
Robert Bragg [Thu, 2 Jun 2011 11:10:59 +0000 (12:10 +0100)]
culling: Use vertex_count not '4' to determine partial culls
We were mistakenly using the constant 4 to determine the number of
vertices that need to be culled for a paint-volume to be considered
fully culled too. This is only ok for 2d volumes and was resulting in
some 3d volumes being considered culled whenever 4 out of 8 vertices
were culled. This fix is simply to reference the vertex_count variable
instead of assuming 4.
Øyvind Kolås [Wed, 1 Jun 2011 21:42:41 +0000 (22:42 +0100)]
stage: ensure correct stage is current when picking
_clutter_stage_do_pick called by interactive picking and
clutter_stage_get_actor_at_pos could be accidentally reading back the wrong
actor id's if an other stage has had a more recent render due to animation.
This should resolve some multi stage / ClutterGtk related pick id warnings.
Emmanuele Bassi [Wed, 1 Jun 2011 17:33:27 +0000 (18:33 +0100)]
stage: Use the debug name for the pick buffer dump stem
This avoids overwriting files in the multi-stage case.
Kristjan SCHMIDT [Wed, 1 Jun 2011 17:22:39 +0000 (19:22 +0200)]
Add Esperanto translation
Peter Ward [Fri, 27 May 2011 14:12:15 +0000 (00:12 +1000)]
device: Prevent segfault
When disposing a slave device without a master.
http://bugzilla.clutter-project.org/show_bug.cgi?id=2655
Emmanuele Bassi [Wed, 25 May 2011 15:22:31 +0000 (16:22 +0100)]
test-binding-pool: Remove usage of deprecated get_gid()
Use the actor name instead of a random, internal numeric id.
Dan Winship [Thu, 19 May 2011 14:46:24 +0000 (10:46 -0400)]
clutter-id-pool: fix warning on bad pick
Commit
13ac1fe7 purported to extend the _clutter_id_pool_lookup()
warning to the case where the id referred to a deleted actor, but did
not actually do so, because _clutter_id_pool_remove() set deleted IDs
to 0xdecafbad, not NULL. Fix this.
https://bugzilla.gnome.org/show_bug.cgi?id=650597
Alejandro Piñeiro [Thu, 19 May 2011 10:58:36 +0000 (12:58 +0200)]
[cally] Removed default actions on CallyActor
Alejandro Piñeiro [Fri, 20 May 2011 12:18:09 +0000 (14:18 +0200)]
[cally] CallyRoot is the parent of any CallyStage object
http://bugzilla.clutter-project.org/show_bug.cgi?id=2597
Alejandro Piñeiro [Fri, 20 May 2011 12:13:14 +0000 (14:13 +0200)]
[cally] Added old cally Changelog (pre clutter-cally merge)
http://bugzilla.clutter-project.org/show_bug.cgi?id=2484
Alejandro Piñeiro [Fri, 20 May 2011 12:07:47 +0000 (14:07 +0200)]
[cally] Removing default name and description
Those were added on the old "just for automatic testing" times. That was
somewhat silly on that moment. Now is just silly (ie: having the stage
returning as default name "Stage").
The real description should be set by the app, or provided by the
context of a specific actor feature (like the tooltip on StWidget).
The current information provided by the default description can be
mostly obtained from the ATK_ROLE, and the indirect debugging
advantage of having always a meaningful description is just not enough
to justify them, and you can solve that by proper debug logging.
Fixes: http://bugzilla.clutter-project.org/show_bug.cgi?id=2482
Alejandro Piñeiro [Fri, 20 May 2011 12:00:35 +0000 (14:00 +0200)]
[cally] Fix a crash on some a11y examples if there isn't accessibility support
Most of the accessibility tests can be executed without the
accessibility support, although it is clear that they will
not work properly (ie using accerciser).
But in some specific cases (right now just the atk event test),
the test will crash if no accessibility support is enabled
Fixes http://bugzilla.clutter-project.org/show_bug.cgi?id=2447
Tomeu Vizoso [Fri, 20 May 2011 09:15:07 +0000 (11:15 +0200)]
clutter-offscreen-effect: use target size when setting up the viewport
https://bugzilla.gnome.org/show_bug.cgi?id=650650
Neil Roberts [Mon, 16 May 2011 17:57:37 +0000 (18:57 +0100)]
test-cogl-depth-test: Update to new Cogl API
The Cogl depth state API has changed to have a separate CoglDepthState
struct so this test was no longer building. This patch updates it to
use CoglPipeline and the new depth state API.
Neil Roberts [Mon, 16 May 2011 15:07:19 +0000 (16:07 +0100)]
test-cogl-pixel-buffer: Use the new name for CoglPixelArray
Cogl has changed the name of the experimental CoglPixelArray API to
CoglPixelBuffer. This updates the test to reflect that so it will
continue to build.
Neil Roberts [Mon, 16 May 2011 15:04:27 +0000 (16:04 +0100)]
Fix include location for cogl-pango.h
In Cogl, cogl-pango.h has moved to <cogl-pango/cogl-pango.h>. When
using the experimental 2.0 API (which Clutter does) it is no longer
possible to include it under the old name of <cogl/cogl-pango.h> so we
need to update the include location.
Marek Černocký [Sun, 15 May 2011 19:09:17 +0000 (21:09 +0200)]
Updated Czech translation
Daniel Mustieles [Sun, 15 May 2011 15:46:33 +0000 (17:46 +0200)]
Updated Spanish translation
Matej Urbančič [Sat, 14 May 2011 17:49:39 +0000 (19:49 +0200)]
Updated Slovenian translation
Chris Lord [Mon, 28 Mar 2011 15:10:59 +0000 (16:10 +0100)]
actor: Ensure the validity of the queue_redraw_entry pointer
In _clutter_actor_queue_redraw_with_clip, there was the possibility that
the actor will add itself to the stage's redraw queue without keeping track
of the allocated list member.
In clutter_actor_unparent, the redraw queue entry was being invalidated
before the mapped notify signal was being fired, meaning that queueing a
redraw of an unmapped actor in the mapped notification callback could
cause a crash.
http://bugzilla.clutter-project.org/show_bug.cgi?id=2621
Adam Jackson [Mon, 2 May 2011 16:15:28 +0000 (12:15 -0400)]
test-cogl-sub-texture: Allow single-bit rendering error
Signed-off-by: Adam Jackson <ajax@redhat.com>
http://bugzilla.clutter-project.org/show_bug.cgi?id=2640
Adam Jackson [Mon, 2 May 2011 16:13:57 +0000 (12:13 -0400)]
test-cogl-blend-strings: Allow single-bit rendering error
Signed-off-by: Adam Jackson <ajax@redhat.com>
http://bugzilla.clutter-project.org/show_bug.cgi?id=2640
Øyvind Kolås [Fri, 13 May 2011 20:44:49 +0000 (21:44 +0100)]
doap: fix a typo in a url
Emmanuele Bassi [Fri, 13 May 2011 13:26:22 +0000 (14:26 +0100)]
text: Check the has_focus flag in selection_paint()
It is the only place were it is used, so it should only be checked
there, and not in the general paint() implementation.
Emmanuele Bassi [Fri, 13 May 2011 13:17:39 +0000 (14:17 +0100)]
text: Implement the ::has_overlaps virtual
Since ClutterText has overlapping primitives when selecting, or a
visible cursor, then we need to report that to Clutter, to avoid
bleeding colors through when a Text actor is non-fully opaque.
Jasper St. Pierre [Wed, 2 Mar 2011 17:02:56 +0000 (12:02 -0500)]
clutter-text: Add a selected-text-color
http://bugzilla.clutter-project.org/show_bug.cgi?id=2595
Jasper St. Pierre [Thu, 3 Mar 2011 11:33:42 +0000 (06:33 -0500)]
tests: Add test for selected-text-color
http://bugzilla.clutter-project.org/show_bug.cgi?id=2595
Neil Roberts [Fri, 13 May 2011 14:29:50 +0000 (15:29 +0100)]
clutter-actor: Store the queue_redraw_entry when queueing a redraw
_clutter_stage_queue_actor_redraw returns a pointer to the
ClutterStageQueueRedrawEntry struct which it allocates. The actor is
expected to store a pointer to this so that it doesn't need to search
the list of queued redraws next time a queue redraw is called. However
_clutter_actor_queue_redraw_full wasn't storing this pointer which
meant that it thought every queue redraw was the first queue
redraw. That meant that queueing a redraw with a clip or an effect
would override any previous attempts to queue a redraw instead of
trying to combine them.
I think this happened because the old queue_redraw_with_clip also
didn't store the pointer and queue_redraw_full was based on that.
Neil Roberts [Mon, 14 Mar 2011 16:30:53 +0000 (16:30 +0000)]
clutter-actor: Add a 'has_overlaps' virtual
This adds a virtual to ClutterActor so that an actor subclass can
report whether it has overlapping primitives. ClutterActor uses this
to determine whether it needs to use ClutterFlattenEffect to implement
the opacity property. The default implementation of the virtual
returns TRUE which means that most actors will end up being redirected
offscreen when the opacity != 255. ClutterTexture and ClutterRectangle
override this to return FALSE because they should never need to be
redirected. ClutterClone overrides it to divert to the source.
The values for the ClutterOffscreenRedirect enum have changed to:
AUTOMATIC_FOR_OPACITY
The actor will only be redirected if has_overlaps returns TRUE and
the opacity is < 255
ALWAYS_FOR_OPACITY
The actor will always be redirected if the opacity < 255 regardless
of the return value of has_overlaps
ALWAYS
The actor will always be redirected offscreen.
This means that the property can't be used to prevent the actor from
being redirected but only to increase the likelihood that it will be
redirected.
ClutterActor now adds and removes the flatten effect depending on
whether flattening is needed directly in clutter_actor_paint(). There
are new internal versions of add/remove_effect that don't queue a
redraw. This means that ClutterFlattenEffect is now just a no-op
subclass of ClutterOffscreen. It is only needed because
ClutterOffscreen is abstract. Removing the effect also makes it so
that the cached image will be freed as soon as an actor is repainted
without being flattened.
Neil Roberts [Fri, 4 Mar 2011 16:48:59 +0000 (16:48 +0000)]
Add a conformance test for the offscreen-redirect property
This adds a conformance test for redirecting offscreen. It verifies
that the redirected actor has the right paint opacity, that it gets
redrawn only when the image cache needs to be invalidated and that it
ends up with the right appearance.
Neil Roberts [Mon, 28 Feb 2011 15:05:51 +0000 (15:05 +0000)]
clutter-actor: Add an 'offscreen-redirect' property
This adds a property which can be used to redirect the actor through
an FBO before painting so that it becomes flattened in an image. The
image can be used as a cache to avoid having to repaint the actor if
something unrelated in the scene changes. It can also be used to
implement correct opacity even if the actor has overlapping
primitives. The property is an enum that takes three values:
CLUTTER_OFFSCREEN_REDIRECT_NEVER: The default behaviour which is to
never flatten the actor.
CLUTTER_OFFSCREEN_REDIRECT_ALWAYS: The actor is always redirected
through an FBO.
CLUTTER_OFFSCREEN_REDIRECT_ONLY_FOR_OPACITY: The actor is only
redirected through an FBO if the paint opacity is not 255. This
value would be used if the actor wants correct opacity. It will
avoid the overhead of using an FBO whenever the actor is fully
opaque.
The property is implemented by installing a ClutterFlattenEffect.
ClutterFlattenEffect is a new internal class which subclasses
ClutterOffscreen to redirect the painting to an FBO. When
ClutterOffscreen paints, the effect sets an opacity override on the
actor so that the image will always contain the actor at full
opacity. The opacity is then applied to the resulting image before
painting it to the stage. This means the actor does not need to be
redrawn while the opacity is being animated.
The effect has a high internal priority so that it will always occur
before any other effects and it gets hidden from the application.
Neil Roberts [Tue, 1 Mar 2011 16:39:22 +0000 (16:39 +0000)]
clutter-actor: Redraw or relayout when clearing effects or constraints
When calling clutter_actor_clear_constraints the layout of the actor
may change so we need to queue a relayout. Similarly when the effects
are cleared we need to queue a redraw.
Neil Roberts [Tue, 1 Mar 2011 15:37:04 +0000 (15:37 +0000)]
clutter-actor-meta: Add an internal 'priority' property
This adds a priority property to all ClutterActorMetas. The
ClutterMetaGroup keeps the list sorted so that higher priority metas
remain at the beginning of the list. The priority is a signed integer
with the default as zero. An actor meta can therefore be put before
all default metas with a positive number, or after with a negative
number.
There are constants to set an 'internal' priority. The intention is
that applications wouldn't be allowed to use these values so that we
can keep special internal metas to that are before or after all
application metas.
The property isn't a real GObject property because for now it is
completely internal and only used to implement the 'transparency'
property of ClutterActor. ClutterMetaGroup doesn't currently resort
the list if the property changes so if we wanted to make it public we
should either make it construct-only or make the meta group listen for
changes on the property and resort accordingly.
The methods in ClutterActor that get the list of metas now use a new
function that filters out internal metas from the meta
group. Similarly for clearing the metas, the internal metas are left
in.
Neil Roberts [Mon, 28 Feb 2011 12:16:55 +0000 (12:16 +0000)]
clutter-effect: Add clutter_effect_queue_rerun
This adds a new public function to queue a rerun of an effect. If
nothing else queues a redraw then when the effect's actor is painted
the effect will be run without the CLUTTER_EFFECT_RUN_ACTOR_DIRTY
flag. This allows parametrised offscreen effects to report that they
need to redraw the image without having to redraw the underlying
actor. This will be used to implement the 'transparency' effect of
ClutterActor.
If multiple redraws are queued with different effects then redrawing
is started from the one that occurs last in the list of effects.
Internally the function is a wrapper around the new function
_clutter_actor_queue_redraw_full. This is intended to be the sole
point of code for queuing redraws on an actor. It has parameters for
the clip and the effect. The other two existing functions to queue a
redraw (one with a clip and one without) now wrap around this function
by passing a NULL effect.
Neil Roberts [Fri, 25 Feb 2011 11:24:23 +0000 (11:24 +0000)]
clutter-offscreen-effect: Don't redraw the actor if cached offscreen
When painting an actor, it now tries to determine if the last paint of
the offscreen was using the same matrix and the actor isn't dirty. If
so, it can skip calling clutter_actor_continue_paint and avoid
actually painting the actor. Instead just the offscreen image will be
painted.
Neil Roberts [Wed, 2 Mar 2011 16:55:10 +0000 (16:55 +0000)]
clutter-effect: Add a 'run' virtual
This adds a new virtual to ClutterEffect which is intended to be a
more flexible replacement for the pre and post_paint functions. The
implementation of a run virtual would look something like this:
void
effect_run (ClutterEffect *effect,
ClutterEffectRunFlags flags)
{
/* Set up state */
/* ... */
/* Chain to the next item in the paint sequence */
clutter_actor_continue_paint (priv->actor);
/* Clean up state */
/* ... */
}
ClutterActor now just calls this virtual instead of the pre_paint and
post_paint functions. It keeps track of the next effect in the list so
that it knows what to do when clutter_actor_continue_paint is
called. clutter_actor_continue_paint is a new function added just for
implementing effects.
The default implementation of the run virtual just calls pre_paint and
post_paint so that existing effects will continue to work.
An effect is allowed to conditionally skip calling
clutter_actor_continue_paint(). This is useful to implement effects
that cache the image of an actor. The flags parameter can be used to
determine if the actor is dirty since the last paint. ClutterActor
sets this flag whenever propagated_one_redraw is TRUE which means that
a redraw for this actor or one of its children was queued.
Miguel Bouzada [Thu, 12 May 2011 11:18:02 +0000 (13:18 +0200)]
Updated Galician translations
Emmanuele Bassi [Wed, 11 May 2011 09:11:59 +0000 (10:11 +0100)]
po: Remove a non existent file in POTFILES.in
Daniel Mustieles [Tue, 10 May 2011 19:07:12 +0000 (21:07 +0200)]
Updated Spanish translation
Neil Roberts [Thu, 21 Apr 2011 15:52:54 +0000 (16:52 +0100)]
win32: Use the Cogl WGL winsys
Cogl now has a full WGL winsys so Clutter doesn't need to directly
deal with WGL itself.
Daniel Mustieles [Mon, 9 May 2011 17:24:30 +0000 (19:24 +0200)]
Updated Spanish translation
Daniel Mustieles [Sun, 8 May 2011 15:09:33 +0000 (17:09 +0200)]
Updated Spanish translation
Emmanuele Bassi [Mon, 11 Apr 2011 13:11:39 +0000 (14:11 +0100)]
Make the pick id pool per Stage
The id pool used for the actor's id should be a per-stage field. At some
point, we might have a Stage mapped to multiple framebuffers, or each
Stage mapped to a different framebuffer; also, on backend with low
color precision we don't want to exhaust the size of the available ids
with a global pool. Finally, it's yet another thing we can remove from
the global Clutter context.
Having the id pool allocated per-stage, and the pick id assigned on
Actor:mapped will make the whole pick-id more reliable and future proof.
http://bugzilla.clutter-project.org/show_bug.cgi?id=2633
https://bugzilla.gnome.org/show_bug.cgi?id=647876
Emmanuele Bassi [Mon, 11 Apr 2011 11:30:51 +0000 (12:30 +0100)]
Deprecate actor id
The actor's id, which is currently used to generate the pick color,
should not be part of the public API: it's an internal detail of the
pick implementation, and having it exposed is like punching a hole
through the abstraction.
http://bugzilla.clutter-project.org/show_bug.cgi?id=2633
https://bugzilla.gnome.org/show_bug.cgi?id=647876
Neil Roberts [Fri, 6 May 2011 16:20:06 +0000 (17:20 +0100)]
configure.ac: Remove the check for 'ffs'
The check for the ffs function is only needed by Cogl we don't need to
have it in Clutter's configure script anymore.
Emmanuele Bassi [Fri, 6 May 2011 16:21:00 +0000 (17:21 +0100)]
build: Depend on cogl-pango-1.0
For both builds and introspection.
Emmanuele Bassi [Fri, 6 May 2011 15:56:29 +0000 (16:56 +0100)]
build: Specify the buildreq version for Cogl
Don't just assume the latest.
Emmanuele Bassi [Fri, 6 May 2011 15:55:10 +0000 (16:55 +0100)]
build: Fix introspection rules
Remove some cruft after the surgery that split Cogl out of tree.
Emmanuele Bassi [Fri, 6 May 2011 15:44:40 +0000 (16:44 +0100)]
docs: Fix README.md to match README.in
Robert Bragg [Fri, 6 May 2011 13:55:05 +0000 (14:55 +0100)]
Remove last dependency on the GdkPixbuf API
In test-pixmap.c instead of using the GdkPixbuf API to load the
redhand.png image we now use the cairo API to load the png into a xlib
surface which wraps our Pixmap.
This test was the last thing that depended on the gdk API and since
it's more concise to use Cairo here which is a hard dependency for
Clutter this change means we avoid depending on GdkPixbuf directly.
Robert Bragg [Thu, 5 May 2011 19:56:44 +0000 (20:56 +0100)]
Removes Cogl from the repository
Cogl has now been split out into a standalone project with a separate
repository at git://git.gnome.org/cogl. From now on the Clutter build
will now simply look for a cogl-1.0 pkg-config file to find a suitable
Cogl library to link against at build time.
Emmanuele Bassi [Tue, 12 Apr 2011 16:01:51 +0000 (17:01 +0100)]
stage: Use Cairo to dump the pick buffer
Do not use GdkPixbuf just for getting image data down into a PNG; Cairo
is perfectly capable of doing the same, at least just for debugging
purposes.
https://bugzilla.gnome.org/show_bug.cgi?id=647875
Emmanuele Bassi [Tue, 12 Apr 2011 16:00:46 +0000 (17:00 +0100)]
cairo-texture: Make the pixel order macro public
It stands to reason that any piece of code using Cairo and Cogl at the
same time, and dealing with texture data, will want to use the same
logic Clutter uses to determine the compatible pixel format between the
two.
https://bugzilla.gnome.org/show_bug.cgi?id=647875
Daniel Mustieles [Thu, 5 May 2011 17:26:47 +0000 (19:26 +0200)]
Updated Spanish translation
Neil Roberts [Wed, 30 Mar 2011 15:39:38 +0000 (16:39 +0100)]
cogl-debug: Add an option to disable atlasing sharing
If COGL_DEBUG contains disable-shared-atlas Cogl will not try to share
the atlas between glyphs and images.
Neil Roberts [Wed, 30 Mar 2011 15:33:04 +0000 (16:33 +0100)]
cogl_pipeline_equal: Handle COGL_WRAP_MODE_AUTOMATIC better
When comparing the wrap modes of two pipeline layers it now considers
COGL_WRAP_MODE_AUTOMATIC to be equivalent to CLAMP_TO_EDGE. By the
time the pipeline is in the journal, the upper primitive code is
expected to have overridden this wrap mode with something else if it
wants any other behaviour. This is important for getting text to batch
together with textures because the text explicitly sets the wrap mode
to CLAMP_TO_EDGE on its pipeline.
Neil Roberts [Fri, 26 Feb 2010 13:01:54 +0000 (13:01 +0000)]
cogl-pango: Don't set the special combine function for atlased textures
The material cache will now only set the special combine mode if the
texture only has an alpha component. The atlased textures will have
all four components so it will leave the combine functions at the
default. This increases the chances of batching between glyphs and
images.
When using the global atlas, the glyph from cairo is now rendered into
an ARGB surface rather than an alpha-only surface.
Neil Roberts [Fri, 26 Feb 2010 12:38:22 +0000 (12:38 +0000)]
cogl-pango: Use a seperate cache of pipelines
Instead of creating just two materials (one for texturing and one for
solid primitives) the pango renderer now maintains a cache of
pipelines. The display list can request a pipeline for a texture from
the cache. The same pipeline cache is used by all display lists so
that the pipelines can be shared. This avoids changing the texture on
the material during a paint run.
Neil Roberts [Mon, 22 Feb 2010 16:40:49 +0000 (16:40 +0000)]
cogl-pango-glyph-cache: Don't put zero-sized glyphs in the cache
It now avoids trying to reserve space for zero-sized glyphs. That
happens for example when the layout contains a space. This was causing
the regular glyph cache to be used because the global atlas does not
support zero-sized images. That would then break up the
batching. Instead it now still reserves an entry in the cache but
leaves the texture as COGL_INVALID_HANDLE.
Neil Roberts [Thu, 5 May 2011 15:09:22 +0000 (16:09 +0100)]
Revert "cogl-pango-display-list: Don't use VBOs if the texture can't handle it"
This reverts commit
32c91793e46e0625a19c0d2bc98d6cd147dff702.
This commit is no longer needed since the display list will now only
have primitive textures in it.
Neil Roberts [Wed, 30 Mar 2011 12:48:34 +0000 (13:48 +0100)]
cogl-pango-render: Add the base texture to the display list
When rendering a glyph from a texture, instead of adding the glyph's
texture handle to the display list it now retrieves the base texture
using _cogl_texture_foreach_subtexture_in_region and adds that
instead. That way the display can recognise that glyphs in the global
atlas are sharing the same texture and combine them into one VBO.
Neil Roberts [Wed, 30 Mar 2011 12:46:46 +0000 (13:46 +0100)]
cogl-bitmap-private.h: Include cogl-bitmap.h
There was a header dependency problem which meant that
cogl-texture-private.h couldn't be included without first including
cogl-bitmap.h
Neil Roberts [Wed, 30 Mar 2011 11:56:09 +0000 (12:56 +0100)]
cogl-pango-glyph-cache: Notify of reorg for global atlased glyphs
Whenever the glyph cache puts a glyph in the global atlas it will now
register for notifications of reorganisation of the global
atlases. When this happens it will forward this on as a notification
of reorganisation of the glyph cache.
Neil Roberts [Wed, 30 Mar 2011 11:53:50 +0000 (12:53 +0100)]
cogl-atlas-texture: Add a callback for when any atlas reorganizes
This adds cogl_atlas_texture_* functions to register a callback that
will get invoked whenever any of the CoglAtlas's the textures use get
reorganized. The callback is global and is not tied to any particular
atlas texture.
Neil Roberts [Thu, 18 Feb 2010 17:35:14 +0000 (17:35 +0000)]
pango-glyph-cache: Try to put glyphs in the global atlas
If mipmapping is disabled, it will now try to create a standalone
atlas texture for a glyph rather than putting it in the atlas.
If the atlas texture can't be created then it will fallback to the
glyph cache.
Neil Roberts [Thu, 18 Feb 2010 16:33:12 +0000 (16:33 +0000)]
cogl-atlas-texture: Split out new_from_bitmap to new_with_size
This adds a new function called _cogl_atlas_texture_new_with_size. The
old new_from_bitmap function now just calls this and updates the
texture with the data.
Neil Roberts [Thu, 18 Feb 2010 15:04:06 +0000 (15:04 +0000)]
cogl-pango-display-list: Don't use VBOs if the texture can't handle it
If the texture can't be hardware repeated (ie, if it is sliced or it
has waste) then Cogl will reject the layer when rendering with a
VBO. In this case we should always fall back to rendering with
cogl_rectangle.
This commit is only needed temporarily because Cogl will end up
putting atlas textures in the display list. A later commit in the
series will make it so that the display list always has primitive
textures in it so this commit can be reverted.
Neil Roberts [Thu, 18 Feb 2010 14:30:44 +0000 (14:30 +0000)]
cogl-pango: Use a separate glyph cache for mipmapped rendering
This reverts the changes in
54d8aadf which combined the two glyph
caches into one. We want to start using separate caches again so that
we can non-mipmapped textures into the global atlas.
Robert Bragg [Wed, 4 May 2011 16:02:04 +0000 (17:02 +0100)]
Adds a way for Cogl to control event_mask of foreign wins
This extends cogl_onscreen_x11_set_foreign_xid to take a callback to a
function that details the event mask the Cogl requires the application
to select on foreign windows. This is required because Cogl, for
example, needs to track size changes of a window and may also in the
future want other notifications such as map/unmap.
Most applications wont need to use the foreign xwindow apis, but those
that do are required to pass a valid callback and update the event mask
of their window according to Cogl's requirements.
Robert Bragg [Wed, 4 May 2011 10:10:54 +0000 (11:10 +0100)]
Adds cogl_onscreen_show/hide functions
This adds Cogl API to show and hide onscreen framebuffers. We don't want
to go too far down the road of abstracting window system APIs with Cogl
since that would be out of its scope but the previous idea that we would
automatically map framebuffers on allocation except for those made from
foreign windows wasn't good enough. The problem is that we don't want to
make Clutter always create stages from foreign windows but with the
automatic map semantics then Clutter doesn't get an opportunity to
select for all the events it requires before mapping. This meant that we
wouldn't be delivered a mouse enter event for windows mapped underneath
the cursor which would break Clutters handling of button press events.
Robert Bragg [Tue, 3 May 2011 23:16:50 +0000 (00:16 +0100)]
add missing name mangle for cogl_onscreen_set_swap_throttled
We weren't mangling cogl_onscreen_set_swap_throttled to give it an _EXP
postfix to clarify that it is an experimental symbol.
Robert Bragg [Tue, 3 May 2011 20:00:00 +0000 (21:00 +0100)]
Add missing _cogl_winsys_has_feature prototype
This adds a private prototype for _cogl_winsys_has_feature in
cogl-winsys-private.h to avoid compilation warnings.
Robert Bragg [Tue, 19 Apr 2011 16:48:40 +0000 (17:48 +0100)]
cogl/pango/Makefile.am pass EXTRA_LDFLAGS for linking
When building on windows for example we need to ensure we pass
-no-undefined to the linker. Although we were substituting a
COGL_EXTRA_LDFLAGS variable from our configure.ac we forgot to
reference that when linking cogl-pango.
Robert Bragg [Tue, 19 Apr 2011 16:47:57 +0000 (17:47 +0100)]
cogl/configure.ac: AC_SUBST an empty MAINTAINER_CFLAGS
For compatibility with the way we build Cogl as part of Clutter we now
substitute an empty MAINTAINER_CFLAGS variable. When building Cogl
standalone all our extra CFLAGS go through COGL_EXTRA_CFLAGS so the
separate MAINTAINER_CFLAGS aren't used, but automake will get confused
if a substitution isn't made.
Robert Bragg [Tue, 19 Apr 2011 16:45:26 +0000 (17:45 +0100)]
cogl/configure.ac: check when building for win32
This adds a check for when building on win32 so we can skip pkg-config
checks for opengl and can add appropriate flags to
COGL_EXTRA_{LD,C}FLAGS.
Robert Bragg [Tue, 19 Apr 2011 16:42:48 +0000 (17:42 +0100)]
cogl/configure.ac: fix pkg-config checks
This fixes the gdk-pixbuf check to not mistakenly check for the "xi"
package instead of gdk-pixbuf and remove a spurious listing "gl" in
COGL_PKG_REQUIRES which should only be there when we are using using
opengl not if we are using gles.
Robert Bragg [Tue, 19 Apr 2011 16:40:57 +0000 (17:40 +0100)]
cogl/Makefile.am: pass EXTRA_LDFLAGS for linking
When building on windows for example we need to ensure we pass
-no-undefined to the linker. Although we were substituting a
COGL_EXTRA_LDFLAGS variable from our configure.ac we forgot to
reference that when linking cogl.
Robert Bragg [Mon, 18 Apr 2011 16:45:36 +0000 (17:45 +0100)]
cogl: remove OSX/WIN32 specific bits in favour of a stub winsys
Until Cogl gains native win32/OSX support this remove the osx and win32
winsys files and instead we'll just rely on the stub-winsys.c to handle
these platforms. Since the only thing the platform specific files were
providing anyway was a get_proc_address function; it was trivial to
simply update the clutter backend code to handle this directly for now.
Robert Bragg [Mon, 18 Apr 2011 16:35:15 +0000 (17:35 +0100)]
cogl-gl.c: remove really_enable_npot hack for OSX
This is a workaround for a bug on OSX for some radeon hardware that
we can't verify and the referenced bug link is no longer valid.
If this is really still a problem then a new bug should be opened and we
can look at putting the fix in some more appropriate place than
cogl-gl.c