[cairo-commit] test/large-source-roi.c

Andrea Canciani ranma42 at kemper.freedesktop.org
Wed Jan 19 05:43:17 PST 2011


 test/large-source-roi.c |    4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

New commits:
commit 67cfb20bd0908b73efc208b3c5ca0d027f858864
Author: Andrea Canciani <ranma42 at gmail.com>
Date:   Wed Jan 19 14:35:46 2011 +0100

    test: Workaround pixman limits in large-source-roi
    
    Since 1cc750ed92a936d84b47cac696aaffd226e1c02e pixman won't perform
    the compositing if it can't prove that this the computations it has to
    perform will fit within the size of the variables it uses.
    
    It looks like in this case it cannot prove that no overflow will
    happen unless surface_width <= 30582. Instead of this size (discovered
    by bisection), a safer looking 30000 was chosen. It should still
    trigger the problems the original test was looking for, because
    backends which support 30000xheight surfaces will likely support
    32767xheight as well.

diff --git a/test/large-source-roi.c b/test/large-source-roi.c
index e429f98..dfd3554 100644
--- a/test/large-source-roi.c
+++ b/test/large-source-roi.c
@@ -47,7 +47,9 @@ static cairo_test_status_t
 draw (cairo_t *cr, int width, int height)
 {
     cairo_surface_t *source;
-    double source_width = 32767.0;
+    /* Since 1cc750ed92a936d84b47cac696aaffd226e1c02e pixman will not
+     * paint on the source surface if source_width > 30582. */
+    double source_width = 30000.0;
 
     cairo_set_source_rgb (cr, 1,1,1);
     cairo_paint (cr);


More information about the cairo-commit mailing list