| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
When the clip contains two rectangles which do not intersect it was
generating a clip bounds where the bottom-right corner was above or to
the left of the top-left corner. This would end up allowing the pixels
between the two rectangles instead of clipping everything like it
should. To fix this there is now an extra check which detects this
situation and just clears the clip bounds to all zeroes in a similar
way to what cogl-clip-stack does.
https://bugzilla.gnome.org/show_bug.cgi?id=659029
Reviewed-by: Robert Bragg <robert@linux.intel.com>
Backported from e81c1f3e9 on the Cogl master branch
|
| |
|
| |
|
|
|
|
|
| |
Cogl uses dlopen() directly but doesn't link against dl, thus linking
against Clutter fails when using --as-needed.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
ClutterAnimation uses the weak ref machinery of GObject when associated
to ClutterActor by clutter_actor_animate() and friends - all the while
taking a reference on the actor itself. In order to trigger the weak ref
callback, external code would need to unref the Actor at least twice,
which has slim chance of happening. Plus, the way to destroy an Actor is
to call destroy(), not call unref().
The destruction sequence of ClutterActor emits the ::destroy signal, which
should be used by classes to release external references the might be
holding. My oh my, this sounds *exactly* the case!
So, let's switch to using the ::destroy signal for clutter_actor_animate()
and friends, since we know that the object bound to the Animation is
an Actor, and has a ::destroy signal.
This change has the added benefit of allowing destroying an actor as the
result of the Animation::completed signal without getting a segfault or
other bad things to happen.
Obviously, the change does not affect other GObject classes, or Animation
instances created using clutter_animation_new(); for those, the current
"let's take a reference on the object to avoid it going away in-flight"
mechanism should still suffice.
Side note: it would be interesting if GObject had an interface for
"destructible" objects, so that we could do a safe type check. I guess
it's a Rainy Day Project(tm)...
(cherry picked from commit 57ebce8039c0d82b144c6753246dcb0c6308a844)
Signed-off-by: Emmanuele Bassi <ebassi@linux.intel.com>
|
|
|
|
|
|
|
|
|
|
|
|
| |
Commit 1515a8d7 changed cogl-path so that it will use the vertex
attribute API to stroke the path in a similar way to how it was using
the API to fill the path. However it wasn't clearing the stroke buffer
when the path is modified so it would continue to use the unmodified
stroke.
Reviewed-by: Robert Bragg <robert@linux.intel.com>
Backported from 9082dd0d71b0 of Cogl master
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
(cherry picked from commit f9d7650b97c3788763e14ce3b39f21f19edc41bb)
Signed-off-by: Emmanuele Bassi <ebassi@linux.intel.com>
|
|
|
|
| |
https://bugzilla.gnome.org/show_bug.cgi?id=652034
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The parser couldn't cope with TEXTURE_N source arguments because the
sources are checked in turn to find one that matches the beginning of
the argument. The TEXTURE_N source was checked last so it would end up
matching the regular 'TEXTURE' source and then the parser would choke
when it tries to parse the trailing parts.
This patch just moves the check for TEXTURE_ to the top. It also also
changes it so that the argument only needs to be at least 8 characters
long instead of 9. This is necessary because the parser doesn't
consider the digits to be part of the name of the argument so while we
are parsing 'TEXTURE_0' the length is only 8.
Reviewed-by: Robert Bragg <robert@linux.intel.com>
Backported from 92704124957 of Cogl master
|
|
|
|
|
|
| |
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@linux.intel.com>
https://bugzilla.gnome.org/show_bug.cgi?id=651717
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
When emitting a new-frame signal, priv->elapsed_time is passed as a
parameter. This is a gint64. The closure marshal uses an INT. On some
platforms, this is not received correctly by signal handlers (they
receive 0). One solution is to cast priv->elapsed_time to a gint when
emitting the signal.
We cannot change the signature of the signal without breaking ABI.
https://bugzilla.gnome.org/show_bug.cgi?id=654066
(cherry picked from commit 1402c0511239ede27855a836fd9ca9cc8dbf969d)
Signed-off-by: Emmanuele Bassi <ebassi@linux.intel.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The "editable" property is documented to default to TRUE, but is
initialized to FALSE in the _init() function.
Third party code would be affected if we changed the default to be
TRUE, so we have to change the default value in the GParamSpec.
https://bugzilla.gnome.org/show_bug.cgi?id=654726
(cherry picked from commit 4d58534fbb49be6c39017df1d4a32a9184e28f68)
Signed-off-by: Emmanuele Bassi <ebassi@linux.intel.com>
|
|
|
|
|
|
|
|
|
| |
Clutter 1.6.16 does not compile on Solaris due to the following
syntax errors. Sun Studio compiler doesn't like using "return"
with void functions, and there seems to be a parens issue in
cogl-debug.h.
https://bugzilla.gnome.org/show_bug.cgi?id=654718
|
|
|
|
|
|
|
| |
Use source_with instead of source_height to calculate the the x1/x2
positions for CLUTTER_SNAP_EDGE_RIGHT
https://bugzilla.gnome.org/show_bug.cgi?id=654024
|
|
|
|
|
|
|
|
| |
This makes the dispose code that destroys children resilient against
priv->children being modified during child destruction.
(cherry picked from commit ddc9eb5fa5326904852951a3fa00159bed75fde1)
Signed-off-by: Emmanuele Bassi <ebassi@gnome.org>
|
|
|
|
|
|
|
|
| |
That list is tracking the layers for get_layers_list() and needs to be
freed later on. However _copy() did not initialize it and we ended up
trying to free some garbage pointer.
Cherry picked from Cogl master 221850ec
|
|
|
|
|
|
|
|
|
|
| |
_cogl_pipeline_get_layers() allocates a list on the pipeline to be able
to get the pointer valid as long as possible and store that list in the
pipeline object.
You need to free that list when freeing the pipeline.
Cherry picked from cogl master 711a817
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
When a copy is made of a weak pipeline it tries to promote the weak
parent by taking a reference on that weak pipeline's parent. However
promote_weak_ancestors was instead always taking a reference on the
first parent, regardless of whether it was weak. The corresponding
revert_weak_ancestors function which is supposed to undo the effect of
promote_weak_ancestors only unref'd the parent if was weak. This meant
that any non-weak pipeline copy would end up leaking a reference on
its parent.
This patch changes both functions to have a similar loop. It loops
through all of the parents of the pipeline until it finds one that is
not weak and refs or unrefs the *parent* of that pipeline instead of
the pipeline itself.
This is cherry-picked from 17a558a386 on Cogl git master.
|
|
|
|
| |
https://bugzilla.gnome.org/show_bug.cgi?id=652129
|
|
|
|
| |
https://bugzilla.gnome.org/show_bug.cgi?id=652129
|
|
|
|
| |
https://bugzilla.gnome.org/show_bug.cgi?id=652129
|
|
|
|
| |
https://bugzilla.gnome.org/show_bug.cgi?id=652129
|
| |
|
| |
|
|
|
|
| |
We cannot fix the API retroactively in a stable release.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
When validating a user pipeline before drawing with a CoglVertexBuffer
we sometimes find we have to make some overrides and we handle that by
creating a pipeline which is a weak copy of the user pipeline. The weak
pipeline gets associated with the original pipeline so if that pipeline
is used multiple times then we can re-use the same override pipeline and
skip validation. Because it's a weak pipeline we get notified when the
original material is destroyed or changed so we know our weak pipeline
is now invalid.
When we get notified that the weak material is invalid we should unref
it, but instead we were just discarding our reference to it. This was
resulting in leaking weak materials and in some cases those materials
referenced textures which would then also be leaked.
Cherry-picked from Cogl's commit:
c603dc67ca13d26e3909196500da693a92654dee
|
|
|
|
|
|
|
|
|
| |
The wrapper for the can_hardware_repeat had a cut and paste error so
it would call the wrong function on the child texture.
Many thanks to Owen Taylor for finding this bug.
This is backported from 6d1371e0e9291a on the Cogl master branch.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
When rendering a box for an unknown glyph it would previously just use
the average glyph size for the font. This causes problems because the
size calculations for the layout assume a different size so it can end
up rendering outside of the expected ink rectangle. This patch changes
it to query the size of the glyph in the font. Pango should end up
reporting the size of what would be the hex box which should be the
same as the sized used for the extents calculation.
http://bugzilla.clutter-project.org/show_bug.cgi?id=2599
This is backported from commit db954565d4e9ffeb in Cogl master.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Previously ClutterText was just reporting the allocation as the paint
volume. The preferred size of a ClutterText is just the logical
rectangle of the layout. A pango layout can sometimes draw outside of
its logical rectangle for example with an italicised font with large
serifs. Additionally, ClutterText doesn't make any attempt to clip the
text if the actor gets allocated a size too small for the text so it
would also end up drawing outside of the paint volume in that case. To
fix this, the paint volume is now reported as the ink rect of the
Pango layout. The rectangle for the cursor and selection is also
unioned into that because it won't necessarily be within the ink
rectangle.
The function for drawing the selection rectangles has been split up
into a generic function that calculates the rectangles that need to be
drawn and a function that draws them. That way the get_paint_volume
virtual can share the code to calculate the rectangles.
http://bugzilla.clutter-project.org/show_bug.cgi?id=2599
(cherry picked from commit fe83dee71246ef6fdad07c4cd59d59b433023ebd)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
When the cursor is at the leftmost position in the text the drawn
pixel position is moved to the left by the size of the cursor. There's
no explanation for why this happens and it doesn't seem to make any
sense so this patch removes it. It makes multi-line texts looks odd
because the cursor ends up at a different horizontal position when it
is on the first line from any other line. It also makes using
priv->cursor_pos difficult in any other part of the code because the
paint function modifies it.
The original patch that added this can be traced back to Tidy commit
c356487c15. There's no explanation in the commit message either.
http://bugzilla.clutter-project.org/show_bug.cgi?id=2599
(cherry picked from commit 2505f5b0afadd49d8c5d54d8fb1bf57b9f2a6014)
|
|
|
|
|
|
|
|
|
|
|
|
| |
The COGL_DEBUG=disable-texturing debug variable disables texturing in
the fixed function fragend by not bothering to enable the texture
targets. This wasn't working for the programmable fragends because the
texture targets don't need to be enabled to use them. This patch
modifies the two programmable backends to generate a constant value
for the texture lookups in the shader when the debug variable is
given.
This is backported from commit c3c080481952b33737bea in Cogl master.
|
|
|
|
| |
Introspection is pointless for these.
|
|
|
|
|
|
|
|
| |
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.
(cherry picked from commit 8df8d4ff0fa667cb25148b451ef754115f5c954b)
|
|
|
|
|
|
|
| |
https://bugzilla.gnome.org/show_bug.cgi?id=650650
(cherry picked from commit e59fff7a3f2d490b7a9b8dc8e149dfc20831a141)
Signed-off-by: Emmanuele Bassi <ebassi@linux.intel.com>
|
|
|
|
|
|
|
| |
http://bugzilla.clutter-project.org/show_bug.cgi?id=2644
(cherry picked from commit 9ecddeb1c3fce7bbd3fdb0096713e05a50e6ffcd)
Signed-off-by: Emmanuele Bassi <ebassi@linux.intel.com>
|
|
|
|
|
|
|
|
|
| |
When disposing a slave device without a master.
http://bugzilla.clutter-project.org/show_bug.cgi?id=2655
(cherry picked from commit c836b8c53c473e7d309c6c0c9d25b3ec74c827ff)
Signed-off-by: Emmanuele Bassi <ebassi@linux.intel.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
(cherry-picked from commit 19c986c0c6e0aa08ae76ab7d992fbf70ae5e44a0)
Signed-off-by: Emmanuele Bassi <ebassi@linux.intel.com>
|
|
|
|
|
|
|
|
|
|
|
| |
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
(cherry picked from commit 22cc9b35cb78e9b7a867a3c356647e15bf005c85)
Signed-off-by: Emmanuele Bassi <ebassi@linux.intel.com>
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
When flushing a pipeline that has more layers than the previous
pipeline, the fixed function fragend is supposed to detect that the
texture unit previously had no texture target enabled and then enable
it. However the logic for checking whether the unit was enabled was
broken due to a typing failure when unit->enabled and
unit->current_gl_target were combined into one value in commit
6b7139b0. This was breaking some of the conformance tests when the
fixed function fragend is used.
This was backported from 54f94a0ed07e2 in the Cogl master branch.
https://bugzilla.gnome.org/show_bug.cgi?id=650979
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The CoglPipeline code uses a combination of GL_MAX_TEXTURE_COORDS,
GL_MAX_COMBINED_TEXTURE_IMAGE_UNITS and GL_MAX_TEXTURE_UNITS to
determine the maximum number of layers to allow in a pipeline. However
on fixed function hardware that doesn't advertise either GLSL or ARBfp
it was still using the first two enums which will probably just return
0 and set a GLerror. This meant that we effectively didn't support
using any layers on purely fixed function hardware. This patch changes
it to only use those two enums if the appropriate extensions are
advertised and to always use GL_MAX_TEXTURE_UNITS except on GLES2
where there is no fixed function.
This is backported from 3f0cd9196c6bb8e672 on the Cogl master branch.
https://bugzilla.gnome.org/show_bug.cgi?id=650966
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
_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_with_clip 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 would override
any previous attempts to queue a redraw instead of trying to combine
them.
This is based on commit d95258e987178 in the master branch.
|
|
|
|
|
|
|
|
| |
Older drivers for PowerVR SGX hardware have the vendor-specific
GL_IMG_TEXTURE_NPOT extension instead of the
functionally-equivalent GL_OES_TEXTURE_NPOT extension.
(cherry picked from commit b80d5c81429097ede587906ce1b314a38af80012)
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
In 047227fb cogl_atlas_new was changed so that it can take a flags
parameter to specify whether to clear the new atlases and whether to
copy images to the new atlas after reorganisation. This was done so
that the atlas code could be shared with the glyph cache. At some
point during the development of this patch the flag was just a single
boolean instead and this is accidentally how it is used from the glyph
cache. The glyph cache therefore passes 'TRUE' as the set of flags
which means it will only get the 'clear' flag and not the
'disable-migration' flag. When the glyph cache gets full it will
therefore try to copy the texture to the new atlas as well as
redrawing them with cairo. This causes problems because the glyph
cache needs to work in situations where there is no FBO support.
(cherry picked from commit b36dde61939b270796ec6fd0df824cf1cd3ad514)
|
| |
|
| |
|