With currently distributed versions of Mesa, calling XFreePixmap()
before glxDestroyPixmap() will cause an X error from DRI. So, we
need to make sure that we get rid of the CoglTexturePixmapX11 before
we XFreePixmap().
clutter_x11_texture_pixmap_dispose(): Call
clutter_x11_texture_pixmap_set_pixmap() instead of using XFreePixmap
directly so that we leverage the text-clearing hack and destroy
things in the right order.
clutter_x11_texture_pixmap_set_pixmap(): Don't do a pointless roundtrip
and trap a pointless error when setting pixmap to None.
clutter_x11_texture_pixmap_set_pixmap(): Free damage resources when
we are setting Pixmap to None.
clutter_x11_texture_pixmap_set_window(): When setting a new window
or setting the window to None, immedediately call
cluter_x11_texture_pixmap_set_pixmap(). This means that set_window(None)
immediately will free any referenced resources related to the window.
http://bugzilla.clutter-project.org/show_bug.cgi?id=2303
Comprehensively add (out) annotations to functions parameters
returning int/float/double.
Not handled here: structure out returns like ClutterColor or
ClutterPerspective or GValue that should get (out caller-allocates).
Not handled here: Cogl
http://bugzilla.clutter-project.org/show_bug.cgi?id=2302
(element-type) should have a full name like Clutter.Actor rather than
a non-namespaced name like Actor. gobject-introspection has become
more strict about this with the recent scanner rewrite.
http://bugzilla.clutter-project.org/show_bug.cgi?id=2301
*** This is an API change ***
Replaced the original drag-threshold property with two separate
horizontal (x-drag-threshold) and vertical (y-drag-threshold)
thresholds.
It is some times necessary to have different drag thresholds for the
horizontal and vertical axes. For example, when a draggable actor is
inside a horizontal scrolling area, only vertical movement must begin
dragging. That can be achieved by setting the x-drag-threshold to
G_MAXUINT while y-drag-threshold is something usual, say, 20 pixels.
This is different than drag axis, because after the threshold
has been cleared by the pointer, the draggable actor can be dragged
along both axes (if allowed by the drag-axis property).
http://bugzilla.clutter-project.org/show_bug.cgi?id=2291
Signed-off-by: Emmanuele Bassi <ebassi@linux.intel.com>
Creating new materials for every Texture instance results in a lot of
ARBfp programs being generated/compiled. Since most textures will just
be similar we should create a template material for all of them, and
then copy it in every instance. Cogl will try to optimize the generation
of the program and, hopefully, will reuse the same program most of the
time.
With this change, a simple test shows that loading 48 textures will
result in just two programs being compiled - with and without batching
enabled.
http://bugzilla.clutter-project.org/show_bug.cgi?id=2295
When disposing a material layer of type 'texture' we should check that
the texture handle is still valid before calling cogl_handle_unref().
This avoids an assertion failure when disposing a ClutterTexture.
This patch merges in substantial work from
Emmanuele Bassi <ebassi@linux.intel.com>
* Use new introspection --include-uninstalled API since we don't want
to try to find the clutter-1.0.pc file before it's installed.
* Use --pkg-export for Clutter-1.0.gir, since we want the .gir file to
contain the associated pkg-config file.
* Drop the use of --pkg for dependencies; those come from the associated
.gir files. (Actually, --pkg is almost never needed)
* Add --quiet
http://bugzilla.clutter-project.org/show_bug.cgi?id=2292
Intel CE3100 and CE4100 have several planes (framebuffers) and a
hardware blender to blend the planes togeteher to produce the final
image.
clutter_cex100_set_plane() lets you configure which framebuffer clutter
will use for its rendering.
• Use the public COGL_HAS_GLES[12] define instead of the HAVE_COGL_*
ones which are private and defined in config.h,
• Install clutter-egl-headers.h which is needed by clutter-egl.h,
• Remove clutter-stage.h as it's uneeded and does not work since the
single clutter.h include policy,
• Install the egl headers into their own egl directory as the x11 and
glx backends do. The include should then be <clutter/egl/clutter-egl.h>,
so document it. It does not really break anything as nobody could
have used those broken headers.
Intel CE3100 and CE4100 SoCs are designed for TVs. They have separate
framebuffers that are blended together by a piece of hardware to make
the final output. The library that allows you to initialize and
configure those planes is called GDL. A EGL GDL winsys can then be
use with those planes as NativeWindowType to select which plane to use.
This patch adds a new ClutterBackendCex100 backend that can be
selected at compile time with the new --with-flavour=cex100 option.
Some minor fixes here and there: missing include, wrongly placed #endif,
unused variable warning fixes, missing #ifdef.
Make ClutterStageEGL a subclass of either ClutterStageX11 or GObject
depending if you compile with X11 support (EGLX) or not (native).
*** This is an API change ***
The create_target() virtual function should return a CoglHandle to a
texture; clutter_offscreen_effect_get_target(), instead, returns a
CoglMaterial to be painted in the implementation of the paint_target()
virtual function.
Instead of equating textures with materials, and confusing the user of
the API, we should mark the difference more prominently.
First of all, we should return a CoglMaterial* (now that we have that
as a public type) in get_target(); having handles all over the place
does not make it easier to distinguish the semantics of the virtual
functions.
Then we should rename create_target() to create_texture(), to make it
clear that what should be returned is a texture that is used as the
backing for the offscreen framebuffer.
Commit eae4561929 tried to clean how it checks for the private actor
flags. However the check for the 'IN_DESTRUCTION' flag in the Win32
backend got inverted so it would always clear the current
context. This was causing _cogl_check_driver_valid to fail later and
then the realize would get stuck in a infinite loop.
When we free a state because there are no more keys with it as a target use a
goto to re-initialize temporary variables that have become invalid.
Fixing bug #2273
In 965907deb3 the picking was changed to render the full stage
instead of a single pixel whenever picking is performed more than once
between paints. However the condition in the if-statement was
backwards so it would end up always doing a full stage render.
The glx and egl(x) backends export some internal symbols. Hide these
symbols (using '_' prefix) to reduce ABI differentiation between the
glx and eglx flavours.
http://bugzilla.clutter-project.org/show_bug.cgi?id=2267
Signed-off-by: Emmanuele Bassi <ebassi@linux.intel.com>
It can be useful to be able to forcibly break the grab set up by the
ClickAction. The newly added release() method provides a mechanism to
release the grab and unset the :held state of the ClickAction.
This clarifies the documentation for clutter_actor_queue_redraw to
explain that custom actors should call this whenever some private state
changes that affects painting *or* picking.
The expectation is that actors should call clutter_actor_queue_redraw
when ever some private state changes that affects painting *or* picking.
ClutterTexture was not doing this for pick_with_alpha property changes.
The idea is that if we see multiple picks per frame then that implies
the visible scene has become static. In this case we can promote the
next pick render to be unclipped so we have valid pick values for the
entire stage. Now we can continue to read from this cached buffer until
the stage contents do visibly change.
Thanks to Luca Bruno on #clutter for this idea!
Weak materials are ones that don't take a reference on their parent and
they are associated with a callback that notifies when the material is
destroyed, because its parent was freed or modified.
More details can be found at:
http://wiki.clutter-project.org/wiki/CoglDesign/CoglMaterial
For now the concept is internal only but the plan is to make this public
at some point once we have tested the design internally.