Introduce a macro to flush a cairo surface twice.

Flushing the surface twice is necessary due to a cairo bug. For context,
refer to #1989 and https://bugs.freedesktop.org/show_bug.cgi?id=92455.
This commit is contained in:
Ingo Bürk
2015-10-14 18:57:16 +02:00
parent 54dbbe2f06
commit 8178910f16
4 changed files with 17 additions and 6 deletions

View File

@ -133,6 +133,9 @@ static void draw_text_pango(const char *text, size_t text_len,
cairo_move_to(cr, x, y - yoffset);
pango_cairo_show_layout(cr, layout);
/* We need to flush cairo surfaces twice to avoid an assertion bug. See #1989
* and https://bugs.freedesktop.org/show_bug.cgi?id=92455. */
cairo_surface_flush(surface);
cairo_surface_flush(surface);
/* Free resources */