diff options
| author | Bryce Harrington <b.harrington@samsung.com> | 2014-06-02 13:06:44 -0700 |
|---|---|---|
| committer | Bryce Harrington <b.harrington@samsung.com> | 2014-06-02 13:06:44 -0700 |
| commit | 64090de8ae0d99efc6097d08e7de9ce42d4cb462 (patch) | |
| tree | d390114c0577853b7726f9e29cc83a82c05bea1d /src/cairo-tests/mask.cpp | |
| parent | b3a8c05c2a4d12e161836f43831fb3f70f0730ae (diff) | |
tests: No need for static stippled surface
ca_setup_mask() is only called once there's no benefit. This cleanup
simplifies the code by a few lines.
Diffstat (limited to 'src/cairo-tests/mask.cpp')
| -rw-r--r-- | src/cairo-tests/mask.cpp | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/src/cairo-tests/mask.cpp b/src/cairo-tests/mask.cpp index 6342afe..93e17eb 100644 --- a/src/cairo-tests/mask.cpp +++ b/src/cairo-tests/mask.cpp @@ -27,14 +27,10 @@ ca_setup_mask(caskbench_context_t *ctx) 0x00, 0xFF, 0xFF, 0x00, 0x00, 0xFF, 0xFF, 0x00, 0xFF, 0x00, 0x00, 0xFF, }; - static cairo_surface_t *stippled = NULL; - cairo_surface_t *cairo_surface; - - if (stippled == NULL) { - stippled = cairo_image_surface_create_for_data(data, CAIRO_FORMAT_A8, 2, 2, 4); - } + cairo_surface_t *stippled = cairo_image_surface_create_for_data(data, CAIRO_FORMAT_A8, 2, 2, 4); #if USE_EGL + cairo_surface_t *cairo_surface; cairo_device_t *cairo_device = cairo_surface_get_device (ctx->cairo_surface); if (cairo_surface_get_type (ctx->cairo_surface) == CAIRO_SURFACE_TYPE_IMAGE) { cairo_surface = cairo_image_surface_create (CAIRO_FORMAT_A8, 2, 2); |