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

@ -10,6 +10,14 @@
#include <cairo/cairo-xcb.h>
/* We need to flush cairo surfaces twice to avoid an assertion bug. See #1989
* and https://bugs.freedesktop.org/show_bug.cgi?id=92455. */
#define CAIRO_SURFACE_FLUSH(surface) \
do { \
cairo_surface_flush(surface); \
cairo_surface_flush(surface); \
} while (0)
/* Represents a color split by color channel. */
typedef struct color_t {
double red;