summaryrefslogtreecommitdiffstatsci
path: root/src/cairo-tests/image-rotate.cpp
diff options
context:
space:
mode:
authorsuyambulingamrm <suyambu.rm@samsung.com>2014-06-30 15:14:48 +0530
committersuyambulingamrm <suyambu.rm@samsung.com>2014-06-30 15:14:48 +0530
commite6db65c8e94cb9882dbd989b3c3c7fac32aabbd3 (patch)
tree47f02280477b0dcecbcc52640936c16658d440f8 /src/cairo-tests/image-rotate.cpp
parent99a04681228fb5f0b6b253000b0c1f9c569e64bf (diff)
Use utility function to create sample image.
Diffstat (limited to 'src/cairo-tests/image-rotate.cpp')
-rw-r--r--src/cairo-tests/image-rotate.cpp21
1 files changed, 2 insertions, 19 deletions
diff --git a/src/cairo-tests/image-rotate.cpp b/src/cairo-tests/image-rotate.cpp
index e56d706..796fb26 100644
--- a/src/cairo-tests/image-rotate.cpp
+++ b/src/cairo-tests/image-rotate.cpp
@@ -12,31 +12,14 @@
#include "caskbench.h"
#include "caskbench_context.h"
+#include "cairo-shapes.h"
static cairo_surface_t *image;
int
ca_setup_image_rotate(caskbench_context_t *ctx)
{
- int i, x, y;
- cairo_t *cr_image;
-
- image = cairo_image_surface_create (CAIRO_FORMAT_ARGB32, 160, 40);
- cr_image = cairo_create (image);
- cairo_set_source_surface (cr_image, image, 0, 0);
-
- x = 5;
- for (i=0; i<16; i++) {
- x += 10;
- y = (i%2)*10;
-
- cairo_set_source_rgba (cr_image, 1.0/(i+1), 1.0, 16.0*i/255.0, 1.0);
- cairo_rectangle (cr_image, x, y, 10, 10);
- cairo_fill (cr_image);
- }
-
- cairo_destroy (cr_image);
-
+ image = cairoCreateSampleImage (ctx);
return 1;
}