summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEric Anholt <anholt@FreeBSD.org>2006-06-30 11:54:13 +0200
committerEric Anholt <anholt@FreeBSD.org>2006-06-30 11:57:49 +0200
commit2319fc448354c6b965132ada135d38cce8badb9d (patch)
tree01fc026ab08bb3921826befd772870e5b91b7ab9
parent0b9af7ccf482fb1dafed256f21742eb2a9de56f9 (diff)
Add a check for setting a filter on a source picture causing a crash.
(cherry picked from f313b8c4f7bfc2910a55002ba6c8a731796e7d19 commit)
-rw-r--r--t_bug7366.c22
1 files changed, 22 insertions, 0 deletions
diff --git a/t_bug7366.c b/t_bug7366.c
index d11f616..9084327 100644
--- a/t_bug7366.c
+++ b/t_bug7366.c
@@ -110,6 +110,27 @@ bug7366_test_set_picture_clip_rectangles(Display *dpy)
return TRUE;
}
+/**
+ * Check SetPictureFilter on a source potentially causing a crash.
+ */
+static Bool
+bug7366_test_set_picture_filter(Display *dpy)
+{
+ Picture source_pict;
+ XRenderColor color;
+
+ memset(&color, 0, sizeof(color));
+ source_pict = XRenderCreateSolidFill(dpy, &color);
+
+ XRenderSetPictureFilter(dpy, source_pict, "bilinear", NULL, 0);
+ XSync(dpy, FALSE);
+ XSetErrorHandler(NULL);
+
+ XRenderFreePicture(dpy, source_pict);
+
+ return TRUE;
+}
+
Bool
bug7366_test(Display *dpy)
{
@@ -123,6 +144,7 @@ bug7366_test(Display *dpy)
bug7366_test_set_picture_transform(dpy);
bug7366_test_set_alpha_map(dpy);
bug7366_test_set_picture_clip_rectangles(dpy);
+ bug7366_test_set_picture_filter(dpy);
/* If the server isn't gone, then we've succeeded. */
return TRUE;