sna: Wrap glyph composition with sigtrap handling

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
This commit is contained in:
Chris Wilson 2013-11-28 13:14:27 +00:00
parent 974abd0c3a
commit 569b06abea
1 changed files with 13 additions and 0 deletions

View File

@ -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);