Kaydet (Commit) 1d18db33 authored tarafından Caolán McNamara's avatar Caolán McNamara

rhbz#1283420: cairo text + xrender bodge

Change-Id: I926881bcfa4911f3d7f4899711be44a2f6d82026
üst 98f0e0ed
......@@ -42,6 +42,10 @@ struct _XRegion
BOX extents;
};
#if CAIRO_VERSION < CAIRO_VERSION_ENCODE(1, 10, 0)
# define CAIRO_OPERATOR_DIFFERENCE (static_cast<cairo_operator_t>(23))
#endif
X11CairoTextRender::X11CairoTextRender(X11SalGraphics& rParent)
: mrParent(rParent)
{
......@@ -78,6 +82,20 @@ cairo_t* X11CairoTextRender::getCairoContext()
cairo_t *cr = cairo_create(surface);
cairo_surface_destroy(surface);
//rhbz#1283420 bodge to draw and undraw something which has the side effect
//of making the mysterious xrender related problem go away
if (cairo_version() >= CAIRO_VERSION_ENCODE(1, 10, 0))
{
cairo_save(cr);
cairo_set_source_rgb(cr, 1.0, 1.0, 1.0);
cairo_set_operator(cr, CAIRO_OPERATOR_DIFFERENCE);
cairo_rectangle(cr, 0, 0, 1, 1);
cairo_fill_preserve(cr);
cairo_fill(cr);
cairo_restore(cr);
}
return cr;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment