summaryrefslogtreecommitdiff
path: root/boilerplate/cairo-boilerplate.h
diff options
context:
space:
mode:
authorChris Wilson <chris@chris-wilson.co.uk>2008-09-28 13:34:50 +0100
committerChris Wilson <chris@chris-wilson.co.uk>2008-09-28 14:57:12 +0100
commit9841d9d58ea286f798626d325d50a85bf3f02c8f (patch)
treed42133d4101b98bbde056f8fdee6e72ab3ef19a8 /boilerplate/cairo-boilerplate.h
parentcca1fc6358e9d0213dd2b41a5bfd1629eec6511e (diff)
downloadcairo-9841d9d58ea286f798626d325d50a85bf3f02c8f.tar.gz
Automate error checking for fallback-resolution.
For this we extend the boilerplate get_image() routines to extract a single page out of a paginated document and then proceed to manually check each page of the fallback-resolution test. (Well that's the theory, in practice SVG doesn't support multiple pages and so we just generate a new surface for each resolution. But the infrastructure is in place so that we can automate other tests, e.g. test/multi-pages.)
Diffstat (limited to 'boilerplate/cairo-boilerplate.h')
-rw-r--r--boilerplate/cairo-boilerplate.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/boilerplate/cairo-boilerplate.h b/boilerplate/cairo-boilerplate.h
index 7b6dbc31c..11fb1c3c0 100644
--- a/boilerplate/cairo-boilerplate.h
+++ b/boilerplate/cairo-boilerplate.h
@@ -123,11 +123,16 @@ typedef cairo_surface_t *
int id,
void **closure);
+typedef void
+(*cairo_boilerplate_force_fallbacks_t) (cairo_surface_t *surface,
+ unsigned int flags);
+
typedef cairo_status_t
(*cairo_boilerplate_finish_surface_t) (cairo_surface_t *surface);
typedef cairo_surface_t *
(*cairo_boilerplate_get_image_surface_t) (cairo_surface_t *surface,
+ int page,
int width,
int height);
@@ -149,6 +154,7 @@ typedef struct _cairo_boilerplate_target
cairo_content_t content;
unsigned int error_tolerance;
cairo_boilerplate_create_surface_t create_surface;
+ cairo_boilerplate_force_fallbacks_t force_fallbacks;
cairo_boilerplate_finish_surface_t finish_surface;
cairo_boilerplate_get_image_surface_t get_image_surface;
cairo_boilerplate_write_to_png_t write_to_png;
@@ -165,6 +171,7 @@ cairo_boilerplate_free_targets (cairo_boilerplate_target_t **targets);
cairo_surface_t *
_cairo_boilerplate_get_image_surface (cairo_surface_t *src,
+ int page,
int width,
int height);
cairo_surface_t *