summaryrefslogtreecommitdiff
path: root/src/cairo-damage.c
diff options
context:
space:
mode:
authorChris Wilson <chris@chris-wilson.co.uk>2013-01-08 16:06:02 +0000
committerChris Wilson <chris@chris-wilson.co.uk>2013-01-08 16:07:32 +0000
commit2ed484817ef3a5084dc65a2ae1acdef551acd107 (patch)
treec326545b5771d69a8871f8d229765f5f0ea5444c /src/cairo-damage.c
parentb5dcc8ce4450de1e48fd0586fddb5ed658719b28 (diff)
downloadcairo-2ed484817ef3a5084dc65a2ae1acdef551acd107.tar.gz
xlib/shm: Discard damage upon shm finish
Both to make sure we do not leak the memory, but to also prevent _cairo_xlib_surface_put_shm() from operating upon the finished shm surface after the display is closed. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=58253 Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Diffstat (limited to 'src/cairo-damage.c')
-rw-r--r--src/cairo-damage.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/cairo-damage.c b/src/cairo-damage.c
index 1e06b2649..63191fee9 100644
--- a/src/cairo-damage.c
+++ b/src/cairo-damage.c
@@ -40,6 +40,13 @@
static const cairo_damage_t __cairo_damage__nil = { CAIRO_STATUS_NO_MEMORY };
cairo_damage_t *
+_cairo_damage_create_in_error (cairo_status_t status)
+{
+ _cairo_error_throw (status);
+ return (cairo_damage_t *) &__cairo_damage__nil;
+}
+
+cairo_damage_t *
_cairo_damage_create (void)
{
cairo_damage_t *damage;