Home
Reading
Searching
Subscribe
Sponsors
Statistics
Posting
Contact
Spam
Lists
Links
About
Hosting
Filtering
Features Download
Marketing
Archives
FAQ
Blog
 
Gmane
From: =?utf-8?q?S=C3=B8ren=20Sandmann=20Pedersen?= <ssp-H+wXaHxf7aLQT0dZR+AlfA <at> public.gmane.org>
Subject: [PATCH] Revert "Reject trapezoids where top (botttom) is above (below) the edges"
Newsgroups: gmane.comp.graphics.pixman
Date: Wednesday 25th January 2012 19:03:05 UTC (over 6 years ago)
From 259d46168c0f28e861ebb6cf1c7abe2605a55030 Mon Sep 17 00:00:00 2001

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.
---
 pixman/pixman.h             |   12 ++++--------
 test/composite-traps-test.c |    2 +-
 2 files changed, 5 insertions(+), 9 deletions(-)

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);
 }
-- 
1.6.0.6

_______________________________________________
[email protected]: X.Org development
Archives: http://lists.x.org/archives/xorg-devel
Info: http://lists.x.org/mailman/listinfo/xorg-devel
 
CD: 3ms