From c67d99787cb75cd4d773871675b4201b3bf3d5bf Mon Sep 17 00:00:00 2001 From: Chris Wilson Date: Thu, 3 Jan 2008 17:33:33 +0000 Subject: [PATCH] [test/surface-pattern-big-scaled-down] Kill the surface leaks. Destroy the surface and pattern after use. --- test/Makefile.am | 1 + test/surface-pattern-big-scale-down-ref.png | Bin 0 -> 226 bytes test/surface-pattern-big-scale-down.c | 11 ++++++++--- 3 files changed, 9 insertions(+), 3 deletions(-) create mode 100644 test/surface-pattern-big-scale-down-ref.png diff --git a/test/Makefile.am b/test/Makefile.am index e03eec747..ba78d2f51 100644 --- a/test/Makefile.am +++ b/test/Makefile.am @@ -445,6 +445,7 @@ REFERENCE_IMAGES = \ source-clip-scale-svg-ref.png \ source-surface-scale-paint-ref.png \ source-surface-scale-paint-rgb24-ref.png \ + surface-pattern-big-scale-down-ref.png \ surface-pattern-pdf-argb32-ref.png \ surface-pattern-ps-argb32-ref.png \ surface-pattern-ref.png \ diff --git a/test/surface-pattern-big-scale-down-ref.png b/test/surface-pattern-big-scale-down-ref.png new file mode 100644 index 0000000000000000000000000000000000000000..7a8f513e23ce113b39739afba366cec74e1f2570 GIT binary patch literal 226 zcmeAS@N?(olHy`uVBq!ia0y~yU;;831UT4$WP;&w4|H(?D8gRi z>FdgVgOOQK!;pvjYBo@)#nZ(xq+-t7JBEA>3IeVNk5>HGUT@yu)cWZBmV`~bC%HNM zR=r|UTFdvpV&}r@GxqcKneBJ^@iQ>IQD 32768. * x = n * 16. @@ -107,10 +107,15 @@ draw (cairo_t *cr, int width, int height) /* n = 17 */ draw_n (cr, pat, 16.0, 17); #else - for (n = 0; n < 32; n++) - draw_n (cr, pat, 16.0, n); + { + int n; + for (n = 0; n < 32; n++) + draw_n (cr, pat, 16.0, n); + } #endif + cairo_pattern_destroy (pat); + return CAIRO_TEST_SUCCESS; }