summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatthias Clasen <mclasen@redhat.com>2017-12-17 21:24:53 -0500
committerBehdad Esfahbod <behdad@behdad.org>2017-12-17 21:36:17 -0500
commit903b0de539844c144c63ea57c30e84a23360c290 (patch)
tree331941f7ab28bcefbac09bb53e13fd9474f31ccf
parent06964531e01bd0912a0edda81cea459ae460ffaa (diff)
Fix a logic error in color glyph compositing
When a color glyph is completely clipped away, we get the non-zero status 'nothing to do'. In that case, we must not exit early, since there might still be work to do for the other color glyphs. This bug was showing up as color glyphs stopping to render in GTK+ entries that are scrolled to the right, and also as color glyphs not rendering inside the selection sometimes. See https://bugzilla.gnome.org/show_bug.cgi?id=790255 and https://bugzilla.gnome.org/show_bug.cgi?id=788071.
-rw-r--r--src/cairo-surface.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/cairo-surface.c b/src/cairo-surface.c
index 961894a14..18f63df30 100644
--- a/src/cairo-surface.c
+++ b/src/cairo-surface.c
@@ -2742,7 +2742,7 @@ composite_color_glyphs (cairo_surface_t *surface,
status = composite_one_color_glyph (surface, op, source, clip,
&glyphs[gp], scaled_glyph);
- if (unlikely (status))
+ if (unlikely (status && status != CAIRO_INT_STATUS_NOTHING_TO_DO))
goto UNLOCK;
}
@@ -2776,7 +2776,7 @@ composite_color_glyphs (cairo_surface_t *surface,
status = composite_one_color_glyph (surface, op, source, clip,
&glyphs[glyph_pos], scaled_glyph);
- if (unlikely (status))
+ if (unlikely (status && status != CAIRO_INT_STATUS_NOTHING_TO_DO))
goto UNLOCK;
}
@@ -2854,7 +2854,7 @@ _cairo_surface_show_text_glyphs (cairo_surface_t *surface,
scaled_font,
clip);
- if (unlikely (status))
+ if (unlikely (status && status != CAIRO_INT_STATUS_NOTHING_TO_DO))
goto DONE;
if (num_glyphs == 0)