summaryrefslogtreecommitdiff
path: root/extra/pixman/revert-reject-trapezoids-where-top-is-above-the-edges.patch
blob: e661db57c986ef66390b703c3fa33a948aeae37e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
From e5555d7a749c90288463ed1c294f58963c607e52 Mon Sep 17 00:00:00 2001
From: Søren Sandmann Pedersen <ssp@redhat.com>
Date: Wed, 25 Jan 2012 19:03:05 +0000
Subject: Revert "Reject trapezoids where top (botttom) is above (below) the edges"

Cairo 1.10 will sometimes generate trapezoids like this, so we can't
consider them invalid. Fixes bug 45009, reported by Michael Biebl.

This reverts commit 2437ae80e5066dec9fe52f56b016bf136d7cea06.
---
diff --git a/pixman/pixman.h b/pixman/pixman.h
index 20ff496..18d9513 100644
--- a/pixman/pixman.h
+++ b/pixman/pixman.h
@@ -908,14 +908,10 @@ struct pixman_triangle
 };
 
 /* whether 't' is a well defined not obviously empty trapezoid */
-#define pixman_trapezoid_valid(t)					\
-    ((t)->left.p1.y != (t)->left.p2.y &&				\
-     (t)->right.p1.y != (t)->right.p2.y &&				\
-     (int) ((t)->bottom - (t)->top) > 0 &&				\
-     (t)->bottom <= (t)->left.p2.y &&					\
-     (t)->bottom <= (t)->right.p2.y &&					\
-     (t)->top >= (t)->left.p1.y &&					\
-     (t)->top >= (t)->right.p1.y)
+#define pixman_trapezoid_valid(t)				   \
+    ((t)->left.p1.y != (t)->left.p2.y &&			   \
+     (t)->right.p1.y != (t)->right.p2.y &&			   \
+     (int) ((t)->bottom - (t)->top) > 0)
 
 struct pixman_span_fix
 {
diff --git a/test/composite-traps-test.c b/test/composite-traps-test.c
index de518d8..ff03b50 100644
--- a/test/composite-traps-test.c
+++ b/test/composite-traps-test.c
@@ -251,6 +251,6 @@ test_composite (int      testnum,
 int
 main (int argc, const char *argv[])
 {
-    return fuzzer_test_main("composite traps", 40000, 0x4346479C,
+    return fuzzer_test_main("composite traps", 40000, 0xE3112106,
 			    test_composite, argc, argv);
 }
--
cgit v0.9.0.2-2-gbebe