summaryrefslogtreecommitdiff
path: root/boilerplate
diff options
context:
space:
mode:
authorChris Wilson <chris@chris-wilson.co.uk>2010-03-27 21:52:16 +0000
committerChris Wilson <chris@chris-wilson.co.uk>2010-03-27 21:53:55 +0000
commit97f8c20727eaeb2dfddb0d4796192cc042eb14fa (patch)
tree87a4a060c395ed7f5704d4b37026d8f163ed06d7 /boilerplate
parent022291be1cbddf4f6722f0bf76ebda6922780276 (diff)
boilerplate: Create an image16 target
In order to exercise the newly restored r5g6g5 support, we need to create an appropriate surface and feed it through the test and performance suites.
Diffstat (limited to 'boilerplate')
-rw-r--r--boilerplate/cairo-boilerplate-directfb.c6
-rw-r--r--boilerplate/cairo-boilerplate-drm.c6
-rw-r--r--boilerplate/cairo-boilerplate-gl.c12
-rw-r--r--boilerplate/cairo-boilerplate-pdf.c4
-rw-r--r--boilerplate/cairo-boilerplate-ps.c8
-rw-r--r--boilerplate/cairo-boilerplate-quartz.c3
-rw-r--r--boilerplate/cairo-boilerplate-script.c2
-rw-r--r--boilerplate/cairo-boilerplate-skia.c6
-rw-r--r--boilerplate/cairo-boilerplate-svg.c8
-rw-r--r--boilerplate/cairo-boilerplate-test-surfaces.c21
-rw-r--r--boilerplate/cairo-boilerplate-vg.c12
-rw-r--r--boilerplate/cairo-boilerplate-win32-printing.c4
-rw-r--r--boilerplate/cairo-boilerplate-win32.c6
-rw-r--r--boilerplate/cairo-boilerplate-xcb.c21
-rw-r--r--boilerplate/cairo-boilerplate-xlib.c12
-rw-r--r--boilerplate/cairo-boilerplate.c39
-rw-r--r--boilerplate/cairo-boilerplate.h1
17 files changed, 118 insertions, 53 deletions
diff --git a/boilerplate/cairo-boilerplate-directfb.c b/boilerplate/cairo-boilerplate-directfb.c
index 6815dd1b..59a77e1d 100644
--- a/boilerplate/cairo-boilerplate-directfb.c
+++ b/boilerplate/cairo-boilerplate-directfb.c
@@ -216,7 +216,8 @@ static const cairo_boilerplate_target_t targets[] = {
NULL, NULL,
_cairo_boilerplate_get_image_surface,
cairo_surface_write_to_png,
- _cairo_boilerplate_directfb_cleanup
+ _cairo_boilerplate_directfb_cleanup,
+ NULL, TRUE, FALSE, FALSE
},
{
"directfb-bitmap", "directfb", NULL, NULL,
@@ -226,7 +227,8 @@ static const cairo_boilerplate_target_t targets[] = {
NULL, NULL,
_cairo_boilerplate_get_image_surface,
cairo_surface_write_to_png,
- _cairo_boilerplate_directfb_cleanup
+ _cairo_boilerplate_directfb_cleanup,
+ NULL, FALSE, FALSE, FALSE
},
};
CAIRO_BOILERPLATE (directfb, targets);
diff --git a/boilerplate/cairo-boilerplate-drm.c b/boilerplate/cairo-boilerplate-drm.c
index 77a052dd..67fb3aa3 100644
--- a/boilerplate/cairo-boilerplate-drm.c
+++ b/boilerplate/cairo-boilerplate-drm.c
@@ -76,7 +76,8 @@ static const cairo_boilerplate_target_t targets[] = {
_cairo_boilerplate_get_image_surface,
cairo_surface_write_to_png,
NULL,
- _cairo_boilerplate_drm_synchronize
+ _cairo_boilerplate_drm_synchronize,
+ TRUE, FALSE, FALSE
},
{
"drm", "drm", NULL, NULL,
@@ -87,7 +88,8 @@ static const cairo_boilerplate_target_t targets[] = {
_cairo_boilerplate_get_image_surface,
cairo_surface_write_to_png,
NULL,
- _cairo_boilerplate_drm_synchronize
+ _cairo_boilerplate_drm_synchronize,
+ FALSE, FALSE, FALSE
},
};
CAIRO_BOILERPLATE (drm, targets)
diff --git a/boilerplate/cairo-boilerplate-gl.c b/boilerplate/cairo-boilerplate-gl.c
index 59de580d..323c875e 100644
--- a/boilerplate/cairo-boilerplate-gl.c
+++ b/boilerplate/cairo-boilerplate-gl.c
@@ -332,7 +332,8 @@ static const cairo_boilerplate_target_t targets[] = {
_cairo_boilerplate_get_image_surface,
cairo_surface_write_to_png,
_cairo_boilerplate_gl_cleanup,
- _cairo_boilerplate_gl_synchronize
+ _cairo_boilerplate_gl_synchronize,
+ TRUE, FALSE, FALSE
},
{
"gl", "gl", NULL, NULL,
@@ -343,7 +344,8 @@ static const cairo_boilerplate_target_t targets[] = {
_cairo_boilerplate_get_image_surface,
cairo_surface_write_to_png,
_cairo_boilerplate_gl_cleanup,
- _cairo_boilerplate_gl_synchronize
+ _cairo_boilerplate_gl_synchronize,
+ FALSE, FALSE, FALSE
},
{
"gl-window", "gl", NULL, NULL,
@@ -355,7 +357,8 @@ static const cairo_boilerplate_target_t targets[] = {
_cairo_boilerplate_get_image_surface,
cairo_surface_write_to_png,
_cairo_boilerplate_gl_cleanup,
- _cairo_boilerplate_gl_synchronize
+ _cairo_boilerplate_gl_synchronize,
+ FALSE, FALSE, FALSE
},
#if CAIRO_HAS_EGL_FUNCTIONS
{
@@ -367,7 +370,8 @@ static const cairo_boilerplate_target_t targets[] = {
_cairo_boilerplate_get_image_surface,
cairo_surface_write_to_png,
_cairo_boilerplate_egl_cleanup,
- _cairo_boilerplate_egl_synchronize
+ _cairo_boilerplate_egl_synchronize,
+ TRUE, FALSE, FALSE
},
#endif
};
diff --git a/boilerplate/cairo-boilerplate-pdf.c b/boilerplate/cairo-boilerplate-pdf.c
index 6790abd6..d45e6ca8 100644
--- a/boilerplate/cairo-boilerplate-pdf.c
+++ b/boilerplate/cairo-boilerplate-pdf.c
@@ -241,7 +241,7 @@ static const cairo_boilerplate_target_t targets[] = {
_cairo_boilerplate_pdf_get_image_surface,
_cairo_boilerplate_pdf_surface_write_to_png,
_cairo_boilerplate_pdf_cleanup,
- NULL, TRUE, TRUE
+ NULL, FALSE, TRUE, TRUE
},
{
"pdf", "pdf", ".pdf", NULL,
@@ -253,7 +253,7 @@ static const cairo_boilerplate_target_t targets[] = {
_cairo_boilerplate_pdf_get_image_surface,
_cairo_boilerplate_pdf_surface_write_to_png,
_cairo_boilerplate_pdf_cleanup,
- NULL, TRUE, TRUE
+ NULL, FALSE, TRUE, TRUE
},
#endif
};
diff --git a/boilerplate/cairo-boilerplate-ps.c b/boilerplate/cairo-boilerplate-ps.c
index 5ba68aba..a0a5447f 100644
--- a/boilerplate/cairo-boilerplate-ps.c
+++ b/boilerplate/cairo-boilerplate-ps.c
@@ -306,7 +306,7 @@ static const cairo_boilerplate_target_t targets[] = {
_cairo_boilerplate_ps_get_image_surface,
_cairo_boilerplate_ps_surface_write_to_png,
_cairo_boilerplate_ps_cleanup,
- NULL, TRUE, TRUE
+ NULL, FALSE, TRUE, TRUE
},
{
"ps2", "ps", ".ps", NULL,
@@ -318,7 +318,7 @@ static const cairo_boilerplate_target_t targets[] = {
_cairo_boilerplate_ps_get_image_surface,
_cairo_boilerplate_ps_surface_write_to_png,
_cairo_boilerplate_ps_cleanup,
- NULL, TRUE, TRUE
+ NULL, FALSE, TRUE, TRUE
},
{
"ps3", "ps", ".ps", NULL,
@@ -331,7 +331,7 @@ static const cairo_boilerplate_target_t targets[] = {
_cairo_boilerplate_ps_get_image_surface,
_cairo_boilerplate_ps_surface_write_to_png,
_cairo_boilerplate_ps_cleanup,
- NULL, TRUE, TRUE
+ NULL, FALSE, TRUE, TRUE
},
{
"ps3", "ps", ".ps", NULL,
@@ -343,7 +343,7 @@ static const cairo_boilerplate_target_t targets[] = {
_cairo_boilerplate_ps_get_image_surface,
_cairo_boilerplate_ps_surface_write_to_png,
_cairo_boilerplate_ps_cleanup,
- NULL, TRUE, TRUE
+ NULL, FALSE, TRUE, TRUE
},
#endif
};
diff --git a/boilerplate/cairo-boilerplate-quartz.c b/boilerplate/cairo-boilerplate-quartz.c
index 1948d837..2bba47a2 100644
--- a/boilerplate/cairo-boilerplate-quartz.c
+++ b/boilerplate/cairo-boilerplate-quartz.c
@@ -57,6 +57,8 @@ static const cairo_boilerplate_target_t targets[] = {
NULL, NULL,
_cairo_boilerplate_get_image_surface,
cairo_surface_write_to_png,
+ NULL, NULL,
+ TRUE, FALSE, FALSE
},
{
"quartz", "quartz", NULL, NULL,
@@ -66,6 +68,7 @@ static const cairo_boilerplate_target_t targets[] = {
NULL, NULL,
_cairo_boilerplate_get_image_surface,
cairo_surface_write_to_png,
+ NULL, NULL, FALSE, FALSE, FALSE
},
};
CAIRO_BOILERPLATE (quartz, targets)
diff --git a/boilerplate/cairo-boilerplate-script.c b/boilerplate/cairo-boilerplate-script.c
index 7c052a34..0cd7f9db 100644
--- a/boilerplate/cairo-boilerplate-script.c
+++ b/boilerplate/cairo-boilerplate-script.c
@@ -136,6 +136,6 @@ static const cairo_boilerplate_target_t target[] = {{
_cairo_boilerplate_script_get_image_surface,
_cairo_boilerplate_script_surface_write_to_png,
_cairo_boilerplate_script_cleanup,
- NULL, FALSE
+ NULL, FALSE, FALSE, FALSE
}};
CAIRO_BOILERPLATE (script, target)
diff --git a/boilerplate/cairo-boilerplate-skia.c b/boilerplate/cairo-boilerplate-skia.c
index 13ab00b7..f2b8dd79 100644
--- a/boilerplate/cairo-boilerplate-skia.c
+++ b/boilerplate/cairo-boilerplate-skia.c
@@ -37,7 +37,8 @@ static const cairo_boilerplate_target_t targets[] = {
_cairo_boilerplate_skia_create_surface,
NULL, NULL,
_cairo_boilerplate_get_image_surface,
- cairo_surface_write_to_png
+ cairo_surface_write_to_png,
+ NULL, NULL, TRUE, FALSE, FALSE
},
{
"skia", "skia", NULL, NULL,
@@ -46,7 +47,8 @@ static const cairo_boilerplate_target_t targets[] = {
_cairo_boilerplate_skia_create_surface,
NULL, NULL,
_cairo_boilerplate_get_image_surface,
- cairo_surface_write_to_png
+ cairo_surface_write_to_png,
+ NULL, NULL, FALSE, FALSE, FALSE
},
};
CAIRO_BOILERPLATE (skia, targets)
diff --git a/boilerplate/cairo-boilerplate-svg.c b/boilerplate/cairo-boilerplate-svg.c
index fb83513b..43305da8 100644
--- a/boilerplate/cairo-boilerplate-svg.c
+++ b/boilerplate/cairo-boilerplate-svg.c
@@ -282,7 +282,7 @@ static const cairo_boilerplate_target_t targets[] = {
_cairo_boilerplate_svg_get_image_surface,
_cairo_boilerplate_svg_surface_write_to_png,
_cairo_boilerplate_svg_cleanup,
- NULL, TRUE, TRUE
+ NULL, FALSE, TRUE, TRUE
},
{
"svg11", "svg", NULL, NULL,
@@ -294,7 +294,7 @@ static const cairo_boilerplate_target_t targets[] = {
_cairo_boilerplate_svg_get_image_surface,
_cairo_boilerplate_svg_surface_write_to_png,
_cairo_boilerplate_svg_cleanup,
- NULL, TRUE, TRUE
+ NULL, FALSE, TRUE, TRUE
},
{
"svg12", "svg", NULL, NULL,
@@ -306,7 +306,7 @@ static const cairo_boilerplate_target_t targets[] = {
_cairo_boilerplate_svg_get_image_surface,
_cairo_boilerplate_svg_surface_write_to_png,
_cairo_boilerplate_svg_cleanup,
- NULL, TRUE, TRUE
+ NULL, FALSE, TRUE, TRUE
},
{
"svg12", "svg", NULL, NULL,
@@ -318,7 +318,7 @@ static const cairo_boilerplate_target_t targets[] = {
_cairo_boilerplate_svg_get_image_surface,
_cairo_boilerplate_svg_surface_write_to_png,
_cairo_boilerplate_svg_cleanup,
- NULL, TRUE, TRUE
+ NULL, FALSE, TRUE, TRUE
},
#endif
};
diff --git a/boilerplate/cairo-boilerplate-test-surfaces.c b/boilerplate/cairo-boilerplate-test-surfaces.c
index 39d4f4f5..ace6dcc7 100644
--- a/boilerplate/cairo-boilerplate-test-surfaces.c
+++ b/boilerplate/cairo-boilerplate-test-surfaces.c
@@ -237,7 +237,8 @@ static const cairo_boilerplate_target_t targets[] = {
_cairo_boilerplate_test_fallback_create_surface,
NULL, NULL,
_cairo_boilerplate_get_image_surface,
- cairo_surface_write_to_png
+ cairo_surface_write_to_png,
+ NULL, NULL, FALSE, FALSE, FALSE
},
{
"test-fallback", "image", NULL, NULL,
@@ -247,7 +248,8 @@ static const cairo_boilerplate_target_t targets[] = {
_cairo_boilerplate_test_fallback_create_surface,
NULL, NULL,
_cairo_boilerplate_get_image_surface,
- cairo_surface_write_to_png
+ cairo_surface_write_to_png,
+ NULL, NULL, FALSE, FALSE, FALSE
},
{
"test-fallback16", "image", NULL, NULL,
@@ -257,7 +259,8 @@ static const cairo_boilerplate_target_t targets[] = {
_cairo_boilerplate_test_fallback16_create_surface,
NULL, NULL,
NULL, /* _cairo_boilerplate_get_image_surface, */
- cairo_surface_write_to_png
+ cairo_surface_write_to_png,
+ NULL, NULL, FALSE, FALSE, FALSE
},
{
"test-fallback16", "image", NULL, NULL,
@@ -267,7 +270,8 @@ static const cairo_boilerplate_target_t targets[] = {
_cairo_boilerplate_test_fallback16_create_surface,
NULL, NULL,
NULL, /* _cairo_boilerplate_get_image_surface, */
- cairo_surface_write_to_png
+ cairo_surface_write_to_png,
+ NULL, NULL, FALSE, FALSE, FALSE
},
#if CAIRO_HAS_TEST_PAGINATED_SURFACE
{
@@ -280,8 +284,7 @@ static const cairo_boilerplate_target_t targets[] = {
_cairo_boilerplate_test_paginated_get_image_surface,
_cairo_boilerplate_test_paginated_surface_write_to_png,
_cairo_boilerplate_test_paginated_cleanup,
- NULL,
- FALSE, TRUE,
+ NULL, FALSE, TRUE, FALSE
},
{
"test-paginated", "image", NULL, NULL,
@@ -293,8 +296,7 @@ static const cairo_boilerplate_target_t targets[] = {
_cairo_boilerplate_test_paginated_get_image_surface,
_cairo_boilerplate_test_paginated_surface_write_to_png,
_cairo_boilerplate_test_paginated_cleanup,
- NULL,
- FALSE, TRUE
+ NULL, FALSE, TRUE, FALSE
},
#endif
#if CAIRO_HAS_TEST_WRAPPING_SURFACE
@@ -307,6 +309,7 @@ static const cairo_boilerplate_target_t targets[] = {
NULL, NULL,
_cairo_boilerplate_get_image_surface,
cairo_surface_write_to_png,
+ NULL, NULL, FALSE, FALSE, FALSE
},
#endif
#if CAIRO_HAS_TEST_NULL_SURFACE
@@ -319,7 +322,7 @@ static const cairo_boilerplate_target_t targets[] = {
NULL, NULL,
NULL, NULL, NULL,
NULL,
- TRUE, FALSE
+ TRUE, TRUE, FALSE
},
#endif
};
diff --git a/boilerplate/cairo-boilerplate-vg.c b/boilerplate/cairo-boilerplate-vg.c
index 2ea1a07b..8c82628d 100644
--- a/boilerplate/cairo-boilerplate-vg.c
+++ b/boilerplate/cairo-boilerplate-vg.c
@@ -311,7 +311,8 @@ static const cairo_boilerplate_target_t targets[] = {
_cairo_boilerplate_get_image_surface,
cairo_surface_write_to_png,
_cairo_boilerplate_vg_cleanup_glx,
- _cairo_boilerplate_vg_synchronize
+ _cairo_boilerplate_vg_synchronize,
+ TRUE, FALSE, FALSE
},
{
"vg-glx", "vg", NULL, NULL,
@@ -322,7 +323,8 @@ static const cairo_boilerplate_target_t targets[] = {
_cairo_boilerplate_get_image_surface,
cairo_surface_write_to_png,
_cairo_boilerplate_vg_cleanup_glx,
- _cairo_boilerplate_vg_synchronize
+ _cairo_boilerplate_vg_synchronize,
+ FALSE, FALSE, FALSE
},
#endif
#if CAIRO_HAS_EGL_FUNCTIONS
@@ -335,7 +337,8 @@ static const cairo_boilerplate_target_t targets[] = {
_cairo_boilerplate_get_image_surface,
cairo_surface_write_to_png,
_cairo_boilerplate_vg_cleanup_egl,
- _cairo_boilerplate_vg_synchronize
+ _cairo_boilerplate_vg_synchronize,
+ TRUE, FALSE, FALSE
},
{
"vg-egl", "vg", NULL, NULL,
@@ -346,7 +349,8 @@ static const cairo_boilerplate_target_t targets[] = {
_cairo_boilerplate_get_image_surface,
cairo_surface_write_to_png,
_cairo_boilerplate_vg_cleanup_egl,
- _cairo_boilerplate_vg_synchronize
+ _cairo_boilerplate_vg_synchronize,
+ FALSE, FALSE, FALSE
},
#endif
};
diff --git a/boilerplate/cairo-boilerplate-win32-printing.c b/boilerplate/cairo-boilerplate-win32-printing.c
index b5a6fed3..4aeeb24b 100644
--- a/boilerplate/cairo-boilerplate-win32-printing.c
+++ b/boilerplate/cairo-boilerplate-win32-printing.c
@@ -353,7 +353,7 @@ static const cairo_boilerplate_target_t targets[] = {
_cairo_boilerplate_win32_printing_get_image_surface,
_cairo_boilerplate_win32_printing_surface_write_to_png,
_cairo_boilerplate_win32_printing_cleanup,
- NULL, TRUE, TRUE
+ NULL, FALSE, TRUE, TRUE
},
{
"win32-printing", "win32", ".ps", NULL,
@@ -364,7 +364,7 @@ static const cairo_boilerplate_target_t targets[] = {
_cairo_boilerplate_win32_printing_get_image_surface,
_cairo_boilerplate_win32_printing_surface_write_to_png,
_cairo_boilerplate_win32_printing_cleanup,
- NULL, TRUE, TRUE
+ NULL, FALSE, TRUE, TRUE
},
#endif
};
diff --git a/boilerplate/cairo-boilerplate-win32.c b/boilerplate/cairo-boilerplate-win32.c
index 2b3abb18..50ec90ad 100644
--- a/boilerplate/cairo-boilerplate-win32.c
+++ b/boilerplate/cairo-boilerplate-win32.c
@@ -56,7 +56,8 @@ static const cairo_boilerplate_target_t targets[] = {
_cairo_boilerplate_win32_create_surface,
NULL, NULL,
_cairo_boilerplate_get_image_surface,
- cairo_surface_write_to_png
+ cairo_surface_write_to_png,
+ NULL, NULL, TRUE, FALSE, FALSE
},
/* Testing the win32 surface isn't interesting, since for
* ARGB images it just chains to the image backend
@@ -68,7 +69,8 @@ static const cairo_boilerplate_target_t targets[] = {
_cairo_boilerplate_win32_create_surface,
NULL, NULL,
_cairo_boilerplate_get_image_surface,
- cairo_surface_write_to_png
+ cairo_surface_write_to_png,
+ NULL, NULL, FALSE, FALSE, FALSE
},
};
CAIRO_BOILERPLATE (win32, targets)
diff --git a/boilerplate/cairo-boilerplate-xcb.c b/boilerplate/cairo-boilerplate-xcb.c
index 0e5c3b94..5ddf3fa8 100644
--- a/boilerplate/cairo-boilerplate-xcb.c
+++ b/boilerplate/cairo-boilerplate-xcb.c
@@ -601,7 +601,8 @@ static const cairo_boilerplate_target_t targets[] = {
_cairo_boilerplate_get_image_surface,
cairo_surface_write_to_png,
_cairo_boilerplate_xcb_cleanup,
- _cairo_boilerplate_xcb_synchronize
+ _cairo_boilerplate_xcb_synchronize,
+ TRUE, FALSE, FALSE
},
{
"xcb", "xlib", NULL, NULL,
@@ -613,7 +614,8 @@ static const cairo_boilerplate_target_t targets[] = {
_cairo_boilerplate_get_image_surface,
cairo_surface_write_to_png,
_cairo_boilerplate_xcb_cleanup,
- _cairo_boilerplate_xcb_synchronize
+ _cairo_boilerplate_xcb_synchronize,
+ FALSE, FALSE, FALSE
},
{
"xcb-window", "xlib", NULL, NULL,
@@ -625,7 +627,8 @@ static const cairo_boilerplate_target_t targets[] = {
_cairo_boilerplate_get_image_surface,
cairo_surface_write_to_png,
_cairo_boilerplate_xcb_cleanup,
- _cairo_boilerplate_xcb_synchronize
+ _cairo_boilerplate_xcb_synchronize,
+ FALSE, FALSE, FALSE
},
{
"xcb-window&", "xlib", NULL, NULL,
@@ -637,7 +640,8 @@ static const cairo_boilerplate_target_t targets[] = {
_cairo_boilerplate_get_image_surface,
cairo_surface_write_to_png,
_cairo_boilerplate_xcb_cleanup,
- _cairo_boilerplate_xcb_synchronize
+ _cairo_boilerplate_xcb_synchronize,
+ FALSE, FALSE, FALSE
},
{
"xcb-render-0.0", "xlib-fallback", NULL, NULL,
@@ -649,7 +653,8 @@ static const cairo_boilerplate_target_t targets[] = {
_cairo_boilerplate_get_image_surface,
cairo_surface_write_to_png,
_cairo_boilerplate_xcb_cleanup,
- _cairo_boilerplate_xcb_synchronize
+ _cairo_boilerplate_xcb_synchronize,
+ TRUE, FALSE, FALSE
},
{
"xcb-render-0.0", "xlib-fallback", NULL, NULL,
@@ -661,7 +666,8 @@ static const cairo_boilerplate_target_t targets[] = {
_cairo_boilerplate_get_image_surface,
cairo_surface_write_to_png,
_cairo_boilerplate_xcb_cleanup,
- _cairo_boilerplate_xcb_synchronize
+ _cairo_boilerplate_xcb_synchronize,
+ FALSE, FALSE, FALSE
},
{
"xcb-fallback", "xlib-fallback", NULL, NULL,
@@ -673,7 +679,8 @@ static const cairo_boilerplate_target_t targets[] = {
_cairo_boilerplate_get_image_surface,
cairo_surface_write_to_png,
_cairo_boilerplate_xcb_cleanup,
- _cairo_boilerplate_xcb_synchronize
+ _cairo_boilerplate_xcb_synchronize,
+ FALSE, FALSE, FALSE
},
};
CAIRO_BOILERPLATE (xcb, targets)
diff --git a/boilerplate/cairo-boilerplate-xlib.c b/boilerplate/cairo-boilerplate-xlib.c
index fe54d988..1ddaaf40 100644
--- a/boilerplate/cairo-boilerplate-xlib.c
+++ b/boilerplate/cairo-boilerplate-xlib.c
@@ -445,7 +445,8 @@ static const cairo_boilerplate_target_t targets[] = {
_cairo_boilerplate_get_image_surface,
cairo_surface_write_to_png,
_cairo_boilerplate_xlib_cleanup,
- _cairo_boilerplate_xlib_synchronize
+ _cairo_boilerplate_xlib_synchronize,
+ TRUE, FALSE, FALSE
},
{
"xlib", "xlib", NULL, "xlib-reference",
@@ -456,7 +457,8 @@ static const cairo_boilerplate_target_t targets[] = {
_cairo_boilerplate_get_image_surface,
cairo_surface_write_to_png,
_cairo_boilerplate_xlib_cleanup,
- _cairo_boilerplate_xlib_synchronize
+ _cairo_boilerplate_xlib_synchronize,
+ FALSE, FALSE, FALSE
},
{
"xlib-reference", "xlib", NULL, NULL,
@@ -467,7 +469,8 @@ static const cairo_boilerplate_target_t targets[] = {
NULL, /* get_image */
cairo_surface_write_to_png,
_cairo_boilerplate_xlib_cleanup,
- _cairo_boilerplate_xlib_synchronize
+ _cairo_boilerplate_xlib_synchronize,
+ FALSE, FALSE, FALSE
},
#endif
#if CAIRO_HAS_XLIB_SURFACE
@@ -482,7 +485,8 @@ static const cairo_boilerplate_target_t targets[] = {
_cairo_boilerplate_get_image_surface,
cairo_surface_write_to_png,
_cairo_boilerplate_xlib_cleanup,
- _cairo_boilerplate_xlib_synchronize
+ _cairo_boilerplate_xlib_synchronize,
+ FALSE, FALSE, FALSE
},
#endif
};
diff --git a/boilerplate/cairo-boilerplate.c b/boilerplate/cairo-boilerplate.c
index 65e92fa1..cc082801 100644
--- a/boilerplate/cairo-boilerplate.c
+++ b/boilerplate/cairo-boilerplate.c
@@ -149,6 +149,23 @@ _cairo_boilerplate_image_create_surface (const char *name,
return cairo_image_surface_create (format, ceil (width), ceil (height));
}
+static cairo_surface_t *
+_cairo_boilerplate_image16_create_surface (const char *name,
+ cairo_content_t content,
+ double width,
+ double height,
+ double max_width,
+ double max_height,
+ cairo_boilerplate_mode_t mode,
+ int id,
+ void **closure)
+{
+ *closure = NULL;
+
+ /* XXX force CAIRO_CONTENT_COLOR */
+ return cairo_image_surface_create (CAIRO_FORMAT_RGB16_565, ceil (width), ceil (height));
+}
+
#if CAIRO_HAS_RECORDING_SURFACE
static cairo_surface_t *
_cairo_boilerplate_recording_create_surface (const char *name,
@@ -301,7 +318,9 @@ static const cairo_boilerplate_target_t builtin_targets[] = {
NULL, _cairo_boilerplate_image_create_surface,
NULL, NULL,
_cairo_boilerplate_get_image_surface,
- cairo_surface_write_to_png
+ cairo_surface_write_to_png,
+ NULL, NULL,
+ TRUE, FALSE, FALSE
},
{
"image", "image", NULL, NULL,
@@ -309,7 +328,19 @@ static const cairo_boilerplate_target_t builtin_targets[] = {
NULL, _cairo_boilerplate_image_create_surface,
NULL, NULL,
_cairo_boilerplate_get_image_surface,
- cairo_surface_write_to_png
+ cairo_surface_write_to_png,
+ NULL, NULL,
+ FALSE, FALSE, FALSE
+ },
+ {
+ "image16", "image", NULL, NULL,
+ CAIRO_SURFACE_TYPE_IMAGE, CAIRO_CONTENT_COLOR, 0,
+ NULL, _cairo_boilerplate_image16_create_surface,
+ NULL, NULL,
+ _cairo_boilerplate_get_image_surface,
+ cairo_surface_write_to_png,
+ NULL, NULL,
+ TRUE, FALSE, FALSE
},
#if CAIRO_HAS_RECORDING_SURFACE
{
@@ -321,7 +352,7 @@ static const cairo_boilerplate_target_t builtin_targets[] = {
_cairo_boilerplate_get_image_surface,
cairo_surface_write_to_png,
NULL, NULL,
- FALSE, TRUE
+ FALSE, FALSE, TRUE
},
{
"recording", "image", NULL, NULL,
@@ -332,7 +363,7 @@ static const cairo_boilerplate_target_t builtin_targets[] = {
_cairo_boilerplate_get_image_surface,
cairo_surface_write_to_png,
NULL, NULL,
- FALSE, TRUE
+ FALSE, FALSE, TRUE
},
#endif
};
diff --git a/boilerplate/cairo-boilerplate.h b/boilerplate/cairo-boilerplate.h
index 6f9afd13..12bcd79e 100644
--- a/boilerplate/cairo-boilerplate.h
+++ b/boilerplate/cairo-boilerplate.h
@@ -165,6 +165,7 @@ typedef struct _cairo_boilerplate_target {
cairo_boilerplate_write_to_png_t write_to_png;
cairo_boilerplate_cleanup_t cleanup;
cairo_boilerplate_wait_t synchronize;
+ cairo_bool_t is_measurable;
cairo_bool_t is_vector;
cairo_bool_t is_recording;
} cairo_boilerplate_target_t;