From 67cfb20bd0908b73efc208b3c5ca0d027f858864 Mon Sep 17 00:00:00 2001 From: Andrea Canciani Date: Wed, 19 Jan 2011 14:35:46 +0100 Subject: [PATCH] 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. --- test/large-source-roi.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/test/large-source-roi.c b/test/large-source-roi.c index e429f989c..dfd3554d7 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);