summaryrefslogtreecommitdiff
path: root/boilerplate/cairo-boilerplate-test-surfaces.c
diff options
context:
space:
mode:
authorBehdad Esfahbod <behdad@behdad.org>2007-04-20 00:50:48 -0400
committerBehdad Esfahbod <behdad@behdad.org>2007-04-20 00:52:04 -0400
commitabcd929c57459f95e93504e0ef07b012b497a363 (patch)
tree5d5086d4a7f9b79ef0d3e5c1d3b8589be29c733a /boilerplate/cairo-boilerplate-test-surfaces.c
parent97624dc488b41eb83d70b2c44a595daa5d833e7f (diff)
[boilerplate] Add cairo_boilerplate_format_from_content
Diffstat (limited to 'boilerplate/cairo-boilerplate-test-surfaces.c')
-rw-r--r--boilerplate/cairo-boilerplate-test-surfaces.c13
1 files changed, 1 insertions, 12 deletions
diff --git a/boilerplate/cairo-boilerplate-test-surfaces.c b/boilerplate/cairo-boilerplate-test-surfaces.c
index ab202d51..93ca5e7f 100644
--- a/boilerplate/cairo-boilerplate-test-surfaces.c
+++ b/boilerplate/cairo-boilerplate-test-surfaces.c
@@ -128,18 +128,7 @@ _cairo_boilerplate_test_paginated_surface_write_to_png (cairo_surface_t *surface
tpc = cairo_surface_get_user_data (surface, &test_paginated_closure_key);
- switch (tpc->content) {
- case CAIRO_CONTENT_COLOR:
- format = CAIRO_FORMAT_RGB24;
- break;
- case CAIRO_CONTENT_COLOR_ALPHA:
- format = CAIRO_FORMAT_ARGB32;
- break;
- case CAIRO_CONTENT_ALPHA:
- default:
- assert (0); /* not reached */
- return CAIRO_STATUS_NO_MEMORY;
- }
+ format = cairo_boilerplate_format_from_content (tpc->content);
image = cairo_image_surface_create_for_data (tpc->data,
format,