diff options
author | M Joonas Pihlaja <jpihlaja@cc.helsinki.fi> | 2009-09-03 19:18:07 +0300 |
---|---|---|
committer | M Joonas Pihlaja <jpihlaja@cc.helsinki.fi> | 2009-09-03 19:27:24 +0300 |
commit | 9e45673e197d0f43e296483cc6b5ca6df94e7f02 (patch) | |
tree | 0373403303cc677f2e7c022e0103ae73a7d1fde3 /test/large-source-roi.c | |
parent | 12d0613210547b8a50dd7b21a12eb1485ee496b9 (diff) | |
download | cairo-9e45673e197d0f43e296483cc6b5ca6df94e7f02.tar.gz |
[image] Check for out of bounds image surface sizes in constructors.
The image surface code doesn't reliably work on images larger than
32767 in width or height. This patch makes the image surface
constructors fail by returning a surface in the CAIRO_STATUS_INVALID_SIZE
state when given negative or too large dimensions so that client code
gets a prompt and correct error rather than flaky rendering on large
images.
Diffstat (limited to 'test/large-source-roi.c')
-rw-r--r-- | test/large-source-roi.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/test/large-source-roi.c b/test/large-source-roi.c index 8709e4b47..e429f989c 100644 --- a/test/large-source-roi.c +++ b/test/large-source-roi.c @@ -47,7 +47,7 @@ static cairo_test_status_t draw (cairo_t *cr, int width, int height) { cairo_surface_t *source; - double source_width = 66000.0; + double source_width = 32767.0; cairo_set_source_rgb (cr, 1,1,1); cairo_paint (cr); @@ -72,5 +72,5 @@ CAIRO_TEST (large_source_roi, "Uses a all of a large source image.", "stress, source", /* keywords */ NULL, /* requirements */ - 20, 20, + 7, 7, NULL, draw) |