It looks like the intention was to duplicate an XVisualInfo in such a way
that the pointer could be returned and then later freed using XFree. But
Xalloc isn't an Xlib counterpart to XFree; Xlib doesn't provide a general
purpose malloc wrapper afik. By shuffling things about a bit, it was
possible to avoid the need for this hack.
By default, float * is considered as an out argument by gobject
introspection which is wrong for quite a few Cogl symbols. Start adding
annotations to fix that for the ones in the "Primitives" gtk-doc
section.
In the default implementation of container::destroy_child_meta Set child
meta qdata to NULL on the child and not the container, since the child
is the object that owns the data.
The lifetime of the journal VBO is entirely within the scope of the
cogl_journal_flush function so there is no need to store it globally
in the Cogl context. Instead, upload_vertices_to_vbo just returns the
new VBO. cogl_journal_flush stores this in a local variable and
destroys it before returning.
This also fixes an assertion when using the GLES backend which was
caused by nothing initialising the journal_vbo variable.
I just wasted a silly amount time trying to bisect an apparently broken
cogl-test-multitexture until I realized it was just silently failing to load
any textures.
If the system clock rolls back between two frames then we need
to account for the change, to avoid stopping the timeline.
The best option, since a roll back can be any arbitrary amount
of milliseconds, is to skip a frame.
Fixes bug:
http://bugzilla.moblin.org/show_bug.cgi?id=3839
The framebuffer_object spec isn't clear in defining whether attaching a
texture as a renderbuffer with mipmap filtering enabled while the mipmaps
have not been uploaded should result in an incomplete framebuffer object.
(different drivers make different decisions)
To avoid an error with drivers that do consider this a problem we explicitly
set non mipmapped filters before calling glCheckFramebufferStatusEXT. The
filters will later be reset when the texture is actually used for rendering
according to the filters set on the corresponding CoglMaterial.
This unit verifies that an Actor class will invoke the get_preferred_*
virtual functions unless the caching is in effect; it also verifies
that the cached values are correctly evicted.
The size requisition and allocation mechanisms should be thoroughly
tested to avoid unwanted regressions.
For starters, we can test the explicit size setting and the side
effects of calling clutter_actor_set_size().
Since an actor can only be parented to one container we don't need
the extra complications of maintaining a list of ChildMeta objects
attached to an actor in the default implementation of the Container
interface.
ClutterBehaviourPath has been changed and ClutterBehaviourBspline has
been removed; now we use ClutterPath everywhere we need to describe a
path. This warrants a chapter in the migration guide.
Instead of using ClutterActor for the base class of the Stage
implementation we should extend the StageWindow interface with
the required bits (geometry, realization) and use a simple object
class.
This require a wee bit of changes across Backend, Stage and
StageWindow, even though it's mostly re-shuffling.
First of all, StageWindow should get new virtual functions:
* geometry:
- resize()
- get_geometry()
* realization
- realize()
- unrealize()
This covers all the bits that we use from ClutterActor currently
inside the stage implementations.
The ClutterBackend::create_stage() virtual function should create
a StageWindow, and not an Actor (it should always have been; the
fact that it returned an Actor was a leak of the black magic going
on underneath). Since we never guaranteed ABI compatibility for
the Backend class, this is not a problem.
Internally to ClutterStage we can finally drop the shenanigans of
setting/unsetting actor flags on the implementation: if the realization
succeeds, for instance, we set the REALIZED flag on the Stage and
we're done.
As an initial proof of concept, the X11 and GLX stage implementations
have been ported to the New World Order(tm) and show no regressions.
The old code checked whether the property began with 'signal-' and
then checked for 'signal-swapped' and 'signal-after'. This prevented
you from animating a property called for example 'signal-strength'.
The check for the prefix is now in a separate function which also adds
a 'signal-swapped-after' prefix for completeness.
Fixes bug:
http://bugzilla.openedhand.com/show_bug.cgi?id=1798
The blend string compiler checks that the syntax of a function name is
[A-Za-z_]*, preventing the use of DOT3_RGB[A].
Signed-off-by: Emmanuele Bassi <ebassi@linux.intel.com>
The column names are optional - ClutterModel will use the GType name
if there is no user-specified column name. Hence, the ::finalize vfunc
should not try to free an empty column names vector.
Fixes bug:
http://bugzilla.openedhand.com/show_bug.cgi?id=1790
The test-script.json UI definition still used old types, like
ClutterLabel and ClutterCloneTexture. It should move to the classes
that have replaced them.
The default floating point type for JSON is double precision; this means
that we need to conver to single precision when setting a property with
type G_TYPE_FLOAT.
We need to test that the depth sorting of ClutterGroup works correctly
in case we wish to change the data structure that stores the children,
and do so without changing the default behaviour.
The get_type() function for ClutterInterval is missing from the
known GObject types, so gtk-doc doesn't know that it has to
introspect it for hierarchy, properties and signals.
Currently, to update a property inside an animation you have to
get the interval for that property and then call the set_final_value()
method.
We can provide a simpler, bind()-like method for the convenience of
the developers that just validates everything and then calls the
Interval.set_final_value().
Right now we just check for a NULL stage before calling glXMakeCurrent().
We can, though, get a valid stage without an implementation attached to
it while we are disposing a stage after a CLUTTER_DELETE event, since the
events processing is performed on a vblank-locked basis.
ClutterClone bases its preferred size on the preferred size of
the source actor, so it needs to invalid its cached preferred
size when the preferred size of the source actor changes.
In order for this to work, we need to have notification when
the size of the source actor changes, so add a ::queue-relayout
signal to ClutterActor.
Then connect to this from ClutterClone and queue a relayout
on the clone when a relayout is queued on the source.
http://bugzilla.openedhand.com/show_bug.cgi?id=1755
Signed-off-by: Emmanuele Bassi <ebassi@linux.intel.com>
This reverts commit 3c47a3beb5.
Of course I remembered just after pushing the patch why we hadn't done
this before :-) If you look in the glsl spec:
http://www.khronos.org/registry/gles/specs/2.0/es_full_spec_2.0.24.pdf
Section 3.7.10 Texture Completeness and Non-Power-Of-Two Textures
you can see GLES 2.0 doesn't support mipmaps for npot textures.
There is possibly some way we could support this in Cogl but at least
it's not as simple as or-ing in the feature flag, sadly.
The core GLES2 API supports NPOT textures, i.e. there is no extension as for
OpenGL, so we now add COGL_FEATURE_TEXTURE_NPOT to the feature flags in
_cogl_features_init.
Thanks to Gordon Williams for spotting this.
Don't let stringify.sh write to the $srcdir + use the BUILT_SOURCES var in
Makefile.am so as to ensure all .c. and .h files get generated from their
corresponding .glsl files before building other targets.
If the timeline is running backwards, the completed signal handler should
set the final state from the interval's initial value.
Signed-off-by: Emmanuele Bassi <ebassi@linux.intel.com>
When rendering a glyph run from a texture we were premultiplying the
colour once in display_list_render() and then again in
display_list_render_texture(). This was causing the color to come out
wrong. This fixes bug #1775.
Thanks to Pierre-Luc Beaudoin for reporting.
The wrong part of an expression was bracketed in the test to determine
when a new texture matrix needed to be loaded which resulted in the
first pass through _cogl_material_layer_flush_gl_sampler_state
not uploading any user matrix.
clutter_text_move_word_backward/forward() calls did not use the
start argument consistently. Also, clutter_text_move_word_forward()
bound check checked the wrong end.
Fixes#1765
Signed-off-by: Emmanuele Bassi <ebassi@linux.intel.com>
When a letter key is pressed with the control key held down one of
three things will happen :-
a) If the stage is embedded within a GtkClutterEmbed the unicode value
will be filled from gdk_keyval_to_unicode. This will be the same
value as if control was not pressed (so Ctrl+V will be 'v').
b) If the stage is not in a GtkClutterEmbed and Clutter is running on
the X11 backend then it will try to fill in the unicode value from
XLookupString. This *will* take into account the control so the
unicode value will represent a control character (Ctrl+V will be
'\x16').
c) Most other backends will not bother to fill in the unicode
value. Therefore clutter_keysym_to_unicode will be used which also
does not take into account the control key (so Ctrl+V will be 'v').
For cut and paste to work in Nbtk, the control keys need to bubble up
to the parent NbtkEntry container. This works fine for 'b' but not 'a'
and 'c'.
This patch makes ClutterText always allow the event to bubble if the
key is not handled by the binding pool and the control modifier is
down.
Ideally ClutterText would always get a unicode value that takes into
account the modifiers but this is probably best left up to the input
methods.
Signed-off-by: Emmanuele Bassi <ebassi@linux.intel.com>