profile/ivi/clutter.git
13 years ago[cally] CallyRoot is the parent of any CallyStage object
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

13 years ago[cally] Added old cally Changelog (pre clutter-cally merge)
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

13 years ago[cally] Removing default name and description
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

13 years ago[cally] Fix a crash on some a11y examples if there isn't accessibility support
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

13 years agoclutter-offscreen-effect: use target size when setting up the viewport
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

13 years agotest-cogl-depth-test: Update to new Cogl API
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.

13 years agotest-cogl-pixel-buffer: Use the new name for CoglPixelArray
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.

13 years agoFix include location for cogl-pango.h
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.

13 years agoUpdated Czech translation
Marek Černocký [Sun, 15 May 2011 19:09:17 +0000 (21:09 +0200)]
Updated Czech translation

13 years agoUpdated Spanish translation
Daniel Mustieles [Sun, 15 May 2011 15:46:33 +0000 (17:46 +0200)]
Updated Spanish translation

13 years agoUpdated Slovenian translation
Matej Urbančič [Sat, 14 May 2011 17:49:39 +0000 (19:49 +0200)]
Updated Slovenian translation

13 years agoactor: Ensure the validity of the queue_redraw_entry pointer
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

13 years agotest-cogl-sub-texture: Allow single-bit rendering error
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

13 years agotest-cogl-blend-strings: Allow single-bit rendering error
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

13 years agodoap: fix a typo in a url
Øyvind Kolås [Fri, 13 May 2011 20:44:49 +0000 (21:44 +0100)]
doap: fix a typo in a url

13 years agotext: Check the has_focus flag in selection_paint()
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.

13 years agotext: Implement the ::has_overlaps virtual
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.

13 years agoclutter-text: Add a selected-text-color
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

13 years agotests: Add test for selected-text-color
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

13 years agoclutter-actor: Store the queue_redraw_entry when queueing a redraw
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.

13 years agoclutter-actor: Add a 'has_overlaps' virtual
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.

13 years agoAdd a conformance test for the offscreen-redirect property
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.

13 years agoclutter-actor: Add an 'offscreen-redirect' property
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.

13 years agoclutter-actor: Redraw or relayout when clearing effects or constraints
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.

13 years agoclutter-actor-meta: Add an internal 'priority' property
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.

13 years agoclutter-effect: Add clutter_effect_queue_rerun
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.

13 years agoclutter-offscreen-effect: Don't redraw the actor if cached offscreen
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.

13 years agoclutter-effect: Add a 'run' virtual
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.

13 years agoUpdated Galician translations
Miguel Bouzada [Thu, 12 May 2011 11:18:02 +0000 (13:18 +0200)]
Updated Galician translations

13 years agopo: Remove a non existent file in POTFILES.in
Emmanuele Bassi [Wed, 11 May 2011 09:11:59 +0000 (10:11 +0100)]
po: Remove a non existent file in POTFILES.in

13 years agoUpdated Spanish translation
Daniel Mustieles [Tue, 10 May 2011 19:07:12 +0000 (21:07 +0200)]
Updated Spanish translation

13 years agowin32: Use the Cogl WGL winsys
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.

13 years agoUpdated Spanish translation
Daniel Mustieles [Mon, 9 May 2011 17:24:30 +0000 (19:24 +0200)]
Updated Spanish translation

13 years agoUpdated Spanish translation
Daniel Mustieles [Sun, 8 May 2011 15:09:33 +0000 (17:09 +0200)]
Updated Spanish translation

13 years agoMake the pick id pool per Stage
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

13 years agoDeprecate actor id
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

13 years agoconfigure.ac: Remove the check for 'ffs'
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.

13 years agobuild: Depend on cogl-pango-1.0
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.

13 years agobuild: Specify the buildreq version for Cogl
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.

13 years agobuild: Fix introspection rules
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.

13 years agodocs: Fix README.md to match README.in
Emmanuele Bassi [Fri, 6 May 2011 15:44:40 +0000 (16:44 +0100)]
docs: Fix README.md to match README.in

13 years agoRemove last dependency on the GdkPixbuf API
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.

13 years agoRemoves Cogl from the repository
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.

13 years agostage: Use Cairo to dump the pick buffer
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

13 years agocairo-texture: Make the pixel order macro public
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

13 years agoUpdated Spanish translation
Daniel Mustieles [Thu, 5 May 2011 17:26:47 +0000 (19:26 +0200)]
Updated Spanish translation

13 years agocogl-debug: Add an option to disable atlasing sharing
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.

13 years agocogl_pipeline_equal: Handle COGL_WRAP_MODE_AUTOMATIC better
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.

13 years agocogl-pango: Don't set the special combine function for atlased textures
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.

13 years agocogl-pango: Use a seperate cache of pipelines
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.

13 years agocogl-pango-glyph-cache: Don't put zero-sized glyphs in the cache
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.

13 years agoRevert "cogl-pango-display-list: Don't use VBOs if the texture can't handle it"
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.

13 years agocogl-pango-render: Add the base texture to the display list
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.

13 years agocogl-bitmap-private.h: Include cogl-bitmap.h
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

13 years agocogl-pango-glyph-cache: Notify of reorg for global atlased glyphs
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.

13 years agocogl-atlas-texture: Add a callback for when any atlas reorganizes
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.

13 years agopango-glyph-cache: Try to put glyphs in the global atlas
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.

13 years agocogl-atlas-texture: Split out new_from_bitmap to new_with_size
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.

13 years agocogl-pango-display-list: Don't use VBOs if the texture can't handle it
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.

13 years agocogl-pango: Use a separate glyph cache for mipmapped rendering
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.

13 years agoAdds a way for Cogl to control event_mask of foreign wins
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.

13 years agoAdds cogl_onscreen_show/hide functions
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.

13 years agoadd missing name mangle for cogl_onscreen_set_swap_throttled
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.

13 years agoAdd missing _cogl_winsys_has_feature prototype
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.

13 years agocogl/pango/Makefile.am pass EXTRA_LDFLAGS for linking
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.

13 years agocogl/configure.ac: AC_SUBST an empty MAINTAINER_CFLAGS
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.

13 years agocogl/configure.ac: check when building for win32
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.

13 years agocogl/configure.ac: fix pkg-config checks
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.

13 years agocogl/Makefile.am: pass EXTRA_LDFLAGS for linking
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.

13 years agocogl: remove OSX/WIN32 specific bits in favour of a stub winsys
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.

13 years agocogl-gl.c: remove really_enable_npot hack for OSX
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

13 years agocogl/configure.ac: Adds --enable-stub-winsys option
Robert Bragg [Mon, 18 Apr 2011 16:17:21 +0000 (17:17 +0100)]
cogl/configure.ac: Adds --enable-stub-winsys option

We want to be able to split Cogl out as a standalone project but there
are still some window systems that aren't natively supported by Cogl.
This allows Clutter to support those window systems directly but still
work with a standalone Cogl library.

This also ensures we set the SUPPORT_STUB conditional in clutter's
configure.ac when building for win32/osx and wayland.

13 years agowinsys-glx: map X window automatically if not foreign
Robert Bragg [Mon, 18 Apr 2011 15:26:17 +0000 (16:26 +0100)]
winsys-glx: map X window automatically if not foreign

For now we are going for the semantics that when a CoglOnscreen is first
allocated then it will automatically be mapped. This is for convenience
and if you don't want that behaviour then it is possible to instead
create an Onscreen from a foreign X window and in that case it wont be
mapped automatically.

This approach means that Cogl doesn't need onscreen_map/unmap functions
but it's possible we'll decide later that we can't avoid adding such
functions and we'll have to change these semantics.

13 years agocogl/configure.ac: make COGL_HAS_xyz defines public
Robert Bragg [Mon, 18 Apr 2011 14:57:32 +0000 (15:57 +0100)]
cogl/configure.ac: make COGL_HAS_xyz defines public

Instead of using AC_DEFINE for the various COGL_HAS_PLATFORM defines
this now adds them to the COGL_DEFINES_SYMBOLS variable which gets
substituted into the public cogl-defines.h header.

13 years agoadd missing Cogl bits to .gitignore
Robert Bragg [Tue, 12 Apr 2011 17:50:54 +0000 (18:50 +0100)]
add missing Cogl bits to .gitignore

13 years agoclutter/Makefile.am: mark clutter-cex100.h as BUILT_SOURCES
Robert Bragg [Mon, 18 Apr 2011 12:07:21 +0000 (13:07 +0100)]
clutter/Makefile.am: mark clutter-cex100.h as BUILT_SOURCES

clutter-xcex100.h is generated from clutter-cex100.h.in when running
./configure so it should be added to automake's BUILT_SOURCES variable.

13 years agoAdds Cogl Hello World and "X11 foreign" example applications
Robert Bragg [Thu, 17 Mar 2011 19:32:54 +0000 (19:32 +0000)]
Adds Cogl Hello World and "X11 foreign" example applications

This adds a simple standalone Cogl application that can be used to
smoke test a standalone build of Cogl without Clutter.

This also adds an x11-foreign app that shows how a toolkit can ask Cogl
to draw to an X Window that it owns instead of Cogl being responsible
for automatically creating and mapping an X Window for CoglOnscreen.

13 years agocogl/configure.ac: add options to control driver/egl platform
Robert Bragg [Thu, 10 Mar 2011 15:15:08 +0000 (15:15 +0000)]
cogl/configure.ac: add options to control driver/egl platform

This allows more detailed control over the driver and winsys features
that Cogl should have. Cogl is designed so it can support multiple
window systems simultaneously so we have enable/disable options for
the drivers (gl vs gles1 vs gles2) and options for the individual window
systems; currently glx and egl. Egl is broken down into an option
for each platform.

13 years agoEGL: Updates GDL platform support
Robert Bragg [Fri, 4 Mar 2011 12:50:39 +0000 (12:50 +0000)]
EGL: Updates GDL platform support

The GDL API is used for example on intel ce4100 (aka Sodaville) based
systems as a way to allocate memory that can be composited using the
platforms overlay hardware. This updates the Cogl EGL winsys and the
support in Clutter so we can continue to support these platforms.

13 years agoDon't reference GL_STACK_OVERFLOW/UNDERFLOW for GLES
Robert Bragg [Wed, 2 Mar 2011 11:02:50 +0000 (11:02 +0000)]
Don't reference GL_STACK_OVERFLOW/UNDERFLOW for GLES

These symbols aren't available when building with GLES so only reference
them when building with OpenGL.

13 years agowinsys: Expose environment variable to choose winsys
Robert Bragg [Mon, 18 Apr 2011 15:24:51 +0000 (16:24 +0100)]
winsys: Expose environment variable to choose winsys

This makes it possible to override the winsys that cogl uses by setting
the COGL_RENDERER environment variable e.g. to "GLX" or "EGL"

13 years agoAdd a vtable of indirection to the winsys code
Robert Bragg [Fri, 25 Feb 2011 11:29:08 +0000 (11:29 +0000)]
Add a vtable of indirection to the winsys code

So that we can dynamically select what winsys backend to use at runtime
we need to have some indirection to how code accesses the winsys instead
of simply calling _cogl_winsys* functions that would collide if we
wanted to compile more than one backend into Cogl.

13 years agotexture-pixmap-x11: Move GLX code to cogl-winsys-glx.c
Robert Bragg [Tue, 1 Mar 2011 14:43:43 +0000 (14:43 +0000)]
texture-pixmap-x11: Move GLX code to cogl-winsys-glx.c

This moves the GLX specific code from cogl-texture-pixmap-x11.c into
cogl-winsys-glx.c. If we want the winsys components to by dynamically
loadable then we can't have GLX code scattered outside of
cogl-winsys-glx.c. This also sets us up for supporting the
EGL_texture_from_pixmap extension which is almost identical to the
GLX_texture_from_pixmap extension.

13 years agoMoves all EGL code down from Clutter to Cogl
Robert Bragg [Fri, 25 Feb 2011 00:31:41 +0000 (00:31 +0000)]
Moves all EGL code down from Clutter to Cogl

As was recently done for the GLX window system code, this commit moves
the EGL window system code down from the Clutter backend code into a
Cogl winsys.

Note: currently the cogl/configure.ac is hard coded to only build the GLX
winsys so currently this is only available when building Cogl as part
of Clutter.

13 years agoremove references to unused DRM_SURFACELESS EGL platform
Robert Bragg [Fri, 25 Feb 2011 00:49:07 +0000 (00:49 +0000)]
remove references to unused DRM_SURFACELESS EGL platform

The "DRM_SURFACELESS" EGL platform was invented when we were adding the
wayland backend to Clutter but in the end we added a dedicated backend
instead of extending the EGL backend so actually the platform name isn't
used.

13 years agoUpdated Spanish translation
Daniel Mustieles [Wed, 4 May 2011 20:41:43 +0000 (22:41 +0200)]
Updated Spanish translation

13 years agoUpdated Spanish translation
Daniel Mustieles [Wed, 4 May 2011 20:41:04 +0000 (22:41 +0200)]
Updated Spanish translation

13 years agoUpdated Spanish translation
Daniel Mustieles [Tue, 3 May 2011 21:00:04 +0000 (23:00 +0200)]
Updated Spanish translation

13 years agoUpdated Spanish translation
Daniel Mustieles [Mon, 2 May 2011 10:10:34 +0000 (12:10 +0200)]
Updated Spanish translation

13 years agoUpdated Spanish translation
Daniel Mustieles [Fri, 29 Apr 2011 17:48:28 +0000 (19:48 +0200)]
Updated Spanish translation

13 years agoUpdated Spanish translation
Daniel Mustieles [Thu, 28 Apr 2011 18:40:46 +0000 (20:40 +0200)]
Updated Spanish translation

13 years agoUpdated Spanish translation
Daniel Mustieles [Mon, 25 Apr 2011 20:49:42 +0000 (22:49 +0200)]
Updated Spanish translation

13 years agocogl-context: Initialize context->stub_winsys
Neil Roberts [Thu, 21 Apr 2011 15:44:15 +0000 (16:44 +0100)]
cogl-context: Initialize context->stub_winsys

If Cogl is built using a full Winsys then it wasn't initialising
context->stub_winsys which sometimes made it crash later on.

13 years ago[l10n] Updated German translation
Mario Blättermann [Wed, 20 Apr 2011 21:13:26 +0000 (23:13 +0200)]
[l10n] Updated German translation

13 years agocogl-winsys-stub: Remove _cogl_winsys_has_feature
Neil Roberts [Wed, 20 Apr 2011 17:43:02 +0000 (18:43 +0100)]
cogl-winsys-stub: Remove _cogl_winsys_has_feature

Commit b061f737 moved _cogl_winsys_has_feature to the common winsys
code so there's no need to define it in the stub winsys any more. This
was breaking builds for backends using the stub winsys.

13 years agocogl-winsys-glx: Fix the comparison in find_onscreen_for_xid
Neil Roberts [Wed, 20 Apr 2011 16:50:38 +0000 (17:50 +0100)]
cogl-winsys-glx: Fix the comparison in find_onscreen_for_xid

The comparison for finding onscreen framebuffers in
find_onscreen_for_xid had a small thinko so that it would ignore
framebuffers when the negation of the type is onscreen. This ends up
doing the right thing anyway because the onscreen type has the value 0
and the offscreen type has the value 1 but presumably it would fail if
we ever added any other framebuffer types.

13 years agoclutter-backend-glx: Protect against unrefing the Cogl context twice
Neil Roberts [Wed, 20 Apr 2011 10:10:54 +0000 (11:10 +0100)]
clutter-backend-glx: Protect against unrefing the Cogl context twice

The dispose function may be called multiple times during destruction
so it needs to be resilient against destroying any resources
twice. This wasn't the case for the reference to the Cogl context.

13 years agocogl-winsys: Move _cogl_winsys_has_feature to cogl-winsys.c
Neil Roberts [Fri, 15 Apr 2011 15:03:19 +0000 (16:03 +0100)]
cogl-winsys: Move _cogl_winsys_has_feature to cogl-winsys.c

The code for _cogl_winsys_has_feature will be identical in all of the
winsys backends for the time being, so it seems to make sense to have
it in the common cogl-winsys.c file.

13 years agocogl-context: Store winsys features in an array of unsigned ints
Neil Roberts [Fri, 15 Apr 2011 14:39:14 +0000 (15:39 +0100)]
cogl-context: Store winsys features in an array of unsigned ints

Previously the mask of available winsys features was stored in a
CoglBitmask. That isn't the ideal type to use for this because it is
intended for a growable array of bits so it can allocate extra memory
if there are more than 31 flags set. For the winsys feature flags the
highest used bit is known at compile time so it makes sense to
allocate a fixed array instead. This is conceptually similar to the
CoglDebugFlags which are stored in an array of integers with macros to
test a bit in the array. This moves the macros used for CoglDebugFlags
to cogl-flags.h and makes them more generic so they can be shared with
CoglContext.

13 years agocogl-renderer: Move the XEvent filters to be generic for all renderers
Neil Roberts [Wed, 13 Apr 2011 15:41:41 +0000 (16:41 +0100)]
cogl-renderer: Move the XEvent filters to be generic for all renderers

Instead of having cogl_renderer_xlib_add_filter and friends there is
now cogl_renderer_add_native_filter which can be used regardless of
the backend. The callback function for the filter now just takes a
void pointer instead of an XEvent pointer which should be interpreted
differently depending on the backend. For example, on Xlib it would
still be an XEvent but on Windows it could be a MSG. This simplifies
the code somewhat because the _cogl_xlib_add_filter no longer needs to
have its own filter list when a stub renderer is used because there is
always a renderer available.

cogl_renderer_xlib_handle_event has also been renamed to
cogl_renderer_handle_native_event. This just forwards the event on to
all of the listeners. The backend renderer is expected to register its
own event filter if it wants to process the events in some way.