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.
This commit is contained in:
Matthias Clasen 2017-12-17 21:24:53 -05:00 committed by Behdad Esfahbod
parent 06964531e0
commit 903b0de539

View file

@ -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)