mirror of
https://gitlab.freedesktop.org/cairo/cairo.git
synced 2026-05-23 10:48:12 +02:00
xlib/shm: Explicitly release shm surface if we do not own the pixmap
In this case we want to prevent the short-circuiting of the flush of the ShmPixmap that is ordinarily performed during finish(). Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
This commit is contained in:
parent
558f0a5ab4
commit
f864e2d70f
1 changed files with 9 additions and 2 deletions
|
|
@ -377,11 +377,18 @@ _cairo_xlib_surface_finish (void *abstract_surface)
|
||||||
XRenderFreePicture (display->display, surface->embedded_source.picture);
|
XRenderFreePicture (display->display, surface->embedded_source.picture);
|
||||||
if (surface->picture)
|
if (surface->picture)
|
||||||
XRenderFreePicture (display->display, surface->picture);
|
XRenderFreePicture (display->display, surface->picture);
|
||||||
|
|
||||||
|
if (surface->shm) {
|
||||||
|
/* Force the flush for an external surface */
|
||||||
|
if (!surface->owns_pixmap)
|
||||||
|
cairo_surface_flush (surface->shm);
|
||||||
|
cairo_surface_finish (surface->shm);
|
||||||
|
cairo_surface_destroy (surface->shm);
|
||||||
|
}
|
||||||
|
|
||||||
if (surface->owns_pixmap)
|
if (surface->owns_pixmap)
|
||||||
XFreePixmap (display->display, surface->drawable);
|
XFreePixmap (display->display, surface->drawable);
|
||||||
|
|
||||||
cairo_surface_destroy (surface->shm);
|
|
||||||
|
|
||||||
cairo_device_release (&display->base);
|
cairo_device_release (&display->base);
|
||||||
|
|
||||||
return status;
|
return status;
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue