summaryrefslogtreecommitdiff
path: root/clutter
diff options
context:
space:
mode:
authorDaniel van Vugt <daniel.van.vugt@canonical.com>2018-06-26 09:45:34 +0000
committerMarco Trevisan <mail@3v1n0.net>2018-08-30 01:11:33 +0000
commit2ad5a39bd0915578a5acae63f6b37aa68b5fb194 (patch)
tree2ecbde2a678d45e4e479545b7b8d0105aac6a18d /clutter
parentce3278b4b7e99137cf8628d2909e686edc16afcf (diff)
downloadmutter-2ad5a39bd0915578a5acae63f6b37aa68b5fb194.tar.gz
clutter-text: Avoid clipping the wrong framebuffer
`ClutterText` painting for editable single_line_mode actors like `StEntry` is always clipped by: `cogl_framebuffer_push_rectangle_clip (fb, 0, 0, alloc_width, alloc_height)` So it's difficult to get the rectangle wrong. However in cases where the target framebuffer has changed (`cogl_push_framebuffer`) such as when updating `ClutterOffscreenEffect` we had the wrong old value of `fb`. And so would be clipping the wrong framebuffer, effectively not clipping at all. (cherry picked from commit b8340f1355bb1949511effb7868aa2ef7e3731dd)
Diffstat (limited to 'clutter')
-rw-r--r--clutter/clutter/clutter-text.c10
1 files changed, 2 insertions, 8 deletions
diff --git a/clutter/clutter/clutter-text.c b/clutter/clutter/clutter-text.c
index 744d8a323..e186417a2 100644
--- a/clutter/clutter/clutter-text.c
+++ b/clutter/clutter/clutter-text.c
@@ -1782,7 +1782,7 @@ selection_paint (ClutterText *self)
CoglColor cogl_color = { 0, };
CoglFramebuffer *fb;
- fb = _clutter_actor_get_active_framebuffer (actor);
+ fb = cogl_get_draw_framebuffer ();
if (G_UNLIKELY (fb == NULL))
return;
@@ -2391,13 +2391,7 @@ clutter_text_paint (ClutterActor *self)
float alloc_width;
float alloc_height;
- /* FIXME: this should not be needed, but apparently the text-cache
- * test unit manages to get in a situation where the active frame
- * buffer is NULL
- */
- fb = _clutter_actor_get_active_framebuffer (self);
- if (fb == NULL)
- fb = cogl_get_draw_framebuffer ();
+ fb = cogl_get_draw_framebuffer ();
/* Note that if anything in this paint method changes it needs to be
reflected in the get_paint_volume implementation which is tightly