summaryrefslogtreecommitdiff
path: root/src/cairo-xcb-surface.c
diff options
context:
space:
mode:
authorChris Wilson <chris@chris-wilson.co.uk>2012-09-11 18:20:45 +0100
committerChris Wilson <chris@chris-wilson.co.uk>2012-09-11 18:24:33 +0100
commit77330f6b841b6938e0da44b32692cd64b0f53cbd (patch)
treebcd2250a8e2a0bacd63501ceec827642de9833a9 /src/cairo-xcb-surface.c
parent93774ac0348df04c3fa84f5bc01fe35c87a62089 (diff)
downloadcairo-77330f6b841b6938e0da44b32692cd64b0f53cbd.tar.gz
xcb: Always flush the fallback damage to foreign drawables
We need to flush any fallback to a foreign drawable upon finish. However, we must be careful not to attach the snapshot in that case or else we end up with an expected reference. This is similar to the treatment of xlib/shm in commit f864e2d70. Reported-by: Henry Song <henry.song@samsung.com> Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Diffstat (limited to 'src/cairo-xcb-surface.c')
-rw-r--r--src/cairo-xcb-surface.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/cairo-xcb-surface.c b/src/cairo-xcb-surface.c
index bdd6217da..9928f668a 100644
--- a/src/cairo-xcb-surface.c
+++ b/src/cairo-xcb-surface.c
@@ -732,7 +732,8 @@ _cairo_xcb_surface_flush (void *abstract_surface,
}
status = surface->base.status;
- if (status == CAIRO_STATUS_SUCCESS && ! surface->base.finished) {
+ if (status == CAIRO_STATUS_SUCCESS &&
+ (! surface->base._finishing || ! surface->owns_pixmap)) {
status = cairo_surface_status (&surface->fallback->base);
if (status == CAIRO_STATUS_SUCCESS)
@@ -745,7 +746,7 @@ _cairo_xcb_surface_flush (void *abstract_surface,
surface->fallback,
&surface->fallback_damage);
- if (status == CAIRO_STATUS_SUCCESS) {
+ if (status == CAIRO_STATUS_SUCCESS && ! surface->base._finishing) {
_cairo_surface_attach_snapshot (&surface->base,
&surface->fallback->base,
cairo_surface_finish);