[cairo-commit] src/cairo-xcb-surface.c
Chris Wilson
ickle at kemper.freedesktop.org
Tue Sep 11 10:25:45 PDT 2012
src/cairo-xcb-surface.c | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
New commits:
commit 77330f6b841b6938e0da44b32692cd64b0f53cbd
Author: Chris Wilson <chris at chris-wilson.co.uk>
Date: Tue Sep 11 18:20:45 2012 +0100
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 at samsung.com>
Signed-off-by: Chris Wilson <chris at chris-wilson.co.uk>
diff --git a/src/cairo-xcb-surface.c b/src/cairo-xcb-surface.c
index bdd6217..9928f66 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);
More information about the cairo-commit
mailing list