mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 612846 - Part 2: Make cairo_tee_surface support flush. r=roc a=blocking-betan
This commit is contained in:
parent
f1a534a9d2
commit
8be445ca2f
@ -152,6 +152,9 @@ _cairo_surface_wrapper_snapshot (cairo_surface_wrapper_t *wrapper);
|
||||
cairo_private cairo_bool_t
|
||||
_cairo_surface_wrapper_has_show_text_glyphs (cairo_surface_wrapper_t *wrapper);
|
||||
|
||||
cairo_private cairo_status_t
|
||||
_cairo_surface_wrapper_flush (cairo_surface_wrapper_t *wrapper);
|
||||
|
||||
static inline cairo_bool_t
|
||||
_cairo_surface_wrapper_is_active (cairo_surface_wrapper_t *wrapper)
|
||||
{
|
||||
|
@ -524,3 +524,11 @@ _cairo_surface_wrapper_fini (cairo_surface_wrapper_t *wrapper)
|
||||
{
|
||||
cairo_surface_destroy (wrapper->target);
|
||||
}
|
||||
|
||||
cairo_status_t
|
||||
_cairo_surface_wrapper_flush (cairo_surface_wrapper_t *wrapper)
|
||||
{
|
||||
if (wrapper->target->backend->flush) {
|
||||
return wrapper->target->backend->flush(wrapper->target);
|
||||
}
|
||||
}
|
||||
|
@ -467,6 +467,29 @@ _cairo_tee_surface_show_text_glyphs (void *abstract_surface,
|
||||
return status;
|
||||
}
|
||||
|
||||
static cairo_status_t
|
||||
_cairo_tee_surface_flush (void *abstract_surface)
|
||||
{
|
||||
cairo_tee_surface_t *surface = abstract_surface;
|
||||
cairo_surface_wrapper_t *slaves;
|
||||
int n, num_slaves;
|
||||
cairo_status_t status;
|
||||
|
||||
status = _cairo_surface_wrapper_flush(&surface->master);
|
||||
if (unlikely (status))
|
||||
return status;
|
||||
|
||||
num_slaves = _cairo_array_num_elements (&surface->slaves);
|
||||
slaves = _cairo_array_index (&surface->slaves, 0);
|
||||
for (n = 0; n < num_slaves; n++) {
|
||||
status = _cairo_surface_wrapper_flush(&slaves[n]);
|
||||
if (unlikely (status))
|
||||
return status;
|
||||
}
|
||||
|
||||
return CAIRO_STATUS_SUCCESS;
|
||||
}
|
||||
|
||||
static const cairo_surface_backend_t cairo_tee_surface_backend = {
|
||||
CAIRO_SURFACE_TYPE_TEE,
|
||||
_cairo_tee_surface_create_similar,
|
||||
@ -485,7 +508,7 @@ static const cairo_surface_backend_t cairo_tee_surface_backend = {
|
||||
_cairo_tee_surface_get_extents,
|
||||
NULL, /* old_show_glyphs */
|
||||
_cairo_tee_surface_get_font_options,
|
||||
NULL, /* flush */
|
||||
_cairo_tee_surface_flush,
|
||||
NULL, /* mark_dirty_rectangle */
|
||||
NULL, /* scaled_font_fini */
|
||||
NULL, /* scaled_glyph_fini */
|
||||
|
Loading…
Reference in New Issue
Block a user