[qt] Add method to flush qpainter

This is required for non-X11 rendering backends.

Mozilla bug #498910
This commit is contained in:
Tobias Hunger 2009-07-16 00:16:58 -04:00 committed by Jeff Muizelaar
parent e713857b85
commit d782ba04b7

View file

@ -1588,6 +1588,18 @@ _cairo_qt_surface_composite (cairo_operator_t op,
return CAIRO_INT_STATUS_SUCCESS;
}
static cairo_status_t
_cairo_qt_surface_flush (void *abstract_surface)
{
cairo_qt_surface_t *qs = (cairo_qt_surface_t *) abstract_surface;
QPaintDevice * dev = qs->p->device();
qs->p->end();
qs->p->begin(dev);
return CAIRO_STATUS_SUCCESS;
}
/**
** Backend struct
**/
@ -1614,7 +1626,7 @@ static const cairo_surface_backend_t cairo_qt_surface_backend = {
_cairo_qt_surface_get_extents,
NULL, /* old_show_glyphs */
NULL, /* get_font_options */
NULL, /* flush */
_cairo_qt_surface_flush,
NULL, /* mark_dirty_rectangle */
NULL, /* scaled_font_fini */
NULL, /* scaled_glyph_fini */