summaryrefslogtreecommitdiff
path: root/src/cairo-surface-snapshot-inline.h
diff options
context:
space:
mode:
authorChris Wilson <chris@chris-wilson.co.uk>2012-05-01 15:06:46 +0100
committerChris Wilson <chris@chris-wilson.co.uk>2012-05-01 16:55:22 +0100
commit52dfa038b9e0c106aa3f9f08abeb7f53e72a762a (patch)
tree8c5f9cc1ab37c9dd06d08da6bd3ac114393df3c3 /src/cairo-surface-snapshot-inline.h
parentf62f8f907d14a7267f136f299208029c7b904eaa (diff)
downloadcairo-52dfa038b9e0c106aa3f9f08abeb7f53e72a762a.tar.gz
snapshot: Avoid triggering assertion for grabbing the target during destroy
If the source wins the race to acquire the original surface as it is being destroyed, it triggers an assertion. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Diffstat (limited to 'src/cairo-surface-snapshot-inline.h')
-rw-r--r--src/cairo-surface-snapshot-inline.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/cairo-surface-snapshot-inline.h b/src/cairo-surface-snapshot-inline.h
index 7c15b81a7..bf89c772b 100644
--- a/src/cairo-surface-snapshot-inline.h
+++ b/src/cairo-surface-snapshot-inline.h
@@ -37,6 +37,7 @@
#define CAIRO_SURFACE_SNAPSHOT_INLINE_H
#include "cairo-surface-snapshot-private.h"
+#include "cairo-surface-inline.h"
static inline cairo_bool_t
_cairo_surface_snapshot_is_reused (cairo_surface_t *surface)
@@ -51,7 +52,7 @@ _cairo_surface_snapshot_get_target (cairo_surface_t *surface)
cairo_surface_t *target;
CAIRO_MUTEX_LOCK (snapshot->mutex);
- target = cairo_surface_reference (snapshot->target);
+ target = _cairo_surface_reference (snapshot->target);
CAIRO_MUTEX_UNLOCK (snapshot->mutex);
return target;