summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChris Wilson <chris@chris-wilson.co.uk>2013-11-28 13:14:27 +0000
committerChris Wilson <chris@chris-wilson.co.uk>2013-11-28 13:14:27 +0000
commit569b06abeae9b3dcaa611facdd3ec30c67de765b (patch)
treefa8c84c5b58a9c56ca168d3dad1d7b32f759edc0
parent974abd0c3acca7d3b782251d562bf00fd34b395d (diff)
sna: Wrap glyph composition with sigtrap handling
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
-rw-r--r--src/sna/sna_glyphs.c13
1 files changed, 13 insertions, 0 deletions
diff --git a/src/sna/sna_glyphs.c b/src/sna/sna_glyphs.c
index 9b272eff..caa4649f 100644
--- a/src/sna/sna_glyphs.c
+++ b/src/sna/sna_glyphs.c
@@ -1140,6 +1140,11 @@ glyphs_via_mask(struct sna *sna,
if (mask_image == NULL)
goto err_pixmap;
+ if (sigtrap_get()) {
+ pixman_image_unref(mask_image);
+ goto err_pixmap;
+ }
+
memset(pixmap->devPrivate.ptr, 0, pixmap->devKind*height);
#if HAS_PIXMAN_GLYPHS
if (sna->render.glyph_cache) {
@@ -1276,6 +1281,8 @@ next_image:
} while (--nlist);
pixman_image_unref(mask_image);
+ sigtrap_put();
+
mask = CreatePicture(0, &pixmap->drawable,
format, CPComponentAlpha,
&component_alpha, serverClient, &error);
@@ -2038,6 +2045,11 @@ glyphs_via_image(struct sna *sna,
if (mask_image == NULL)
goto err_pixmap;
+ if (sigtrap_get()) {
+ pixman_image_unref(mask_image);
+ goto err_pixmap;
+ }
+
memset(pixmap->devPrivate.ptr, 0, pixmap->devKind*height);
#if HAS_PIXMAN_GLYPHS
if (sna->render.glyph_cache) {
@@ -2173,6 +2185,7 @@ next_image:
list++;
} while (--nlist);
pixman_image_unref(mask_image);
+ sigtrap_put();
component_alpha = NeedsComponent(format->format);