summaryrefslogtreecommitdiff
path: root/boilerplate/cairo-boilerplate-pdf.c
diff options
context:
space:
mode:
authorChris Wilson <chris@chris-wilson.co.uk>2008-09-25 13:24:58 +0100
committerChris Wilson <chris@chris-wilson.co.uk>2008-09-26 13:42:28 +0100
commit48099af9fed7497a230992e41d559a19c5dbdc60 (patch)
treec81c94b1789b7084c267b0143dabdc417a7a06c3 /boilerplate/cairo-boilerplate-pdf.c
parentf2c484d73ce61012a2d9925f15b55e7c51e34b85 (diff)
downloadcairo-48099af9fed7497a230992e41d559a19c5dbdc60.tar.gz
[boilerplate] Retry conversion in process if first attempt fails.
One possibility for a read failure whilst converting the image is if the external utility crashed. This information is important for the test suite as knowing input that causes the converter to crash is just as vital as identifying a crash within the library.
Diffstat (limited to 'boilerplate/cairo-boilerplate-pdf.c')
-rw-r--r--boilerplate/cairo-boilerplate-pdf.c11
1 files changed, 1 insertions, 10 deletions
diff --git a/boilerplate/cairo-boilerplate-pdf.c b/boilerplate/cairo-boilerplate-pdf.c
index fb7d1aa2f..470fb06d2 100644
--- a/boilerplate/cairo-boilerplate-pdf.c
+++ b/boilerplate/cairo-boilerplate-pdf.c
@@ -178,17 +178,8 @@ _cairo_boilerplate_pdf_convert_to_image (cairo_surface_t *surface)
{
pdf_target_closure_t *ptc = cairo_surface_get_user_data (surface,
&pdf_closure_key);
- FILE *file;
- cairo_surface_t *image;
-
- file = cairo_boilerplate_open_any2ppm (ptc->filename, 1);
- if (file == NULL)
- return cairo_boilerplate_surface_create_in_error (CAIRO_STATUS_READ_ERROR);
-
- image = cairo_boilerplate_image_surface_create_from_ppm_stream (file);
- fclose (file);
- return image;
+ return cairo_boilerplate_convert_to_image (ptc->filename, 1);
}
cairo_surface_t *