Skip to content

Commit

Permalink
Fix a logic error in color glyph compositing
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
Matthias Clasen committed Dec 18, 2017
1 parent 0696453 commit 75d6c90
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/cairo-surface.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}

Expand Down Expand Up @@ -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;
}

Expand Down Expand Up @@ -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)
Expand Down

0 comments on commit 75d6c90

Please sign in to comment.