summaryrefslogtreecommitdiff
path: root/boilerplate
diff options
context:
space:
mode:
authorChris Wilson <chris@chris-wilson.co.uk>2009-05-05 13:59:07 +0100
committerChris Wilson <chris@chris-wilson.co.uk>2009-05-05 21:17:11 +0100
commitc488b336449a1a7ca4d3f90785afeec9e21784c3 (patch)
tree58ae561a9b54ac97a01d5a1a6888572d90ee2f62 /boilerplate
parent1d609d672273da494fd596606b59ab1c0010ae6d (diff)
[test] Create a new fallback surface to exercise 16-bit paths.
Add a variation of test-fallback-surface that forces the use of a 16-bit pixman format code instead of the standard 32-bit types. This creates an image surface akin to the fallbacks used with low bit-depth xservers.
Diffstat (limited to 'boilerplate')
-rw-r--r--boilerplate/cairo-boilerplate-test-surfaces-private.h11
-rw-r--r--boilerplate/cairo-boilerplate-test-surfaces.c16
-rw-r--r--boilerplate/cairo-boilerplate.c18
3 files changed, 45 insertions, 0 deletions
diff --git a/boilerplate/cairo-boilerplate-test-surfaces-private.h b/boilerplate/cairo-boilerplate-test-surfaces-private.h
index 481b531e7..24a1ae81a 100644
--- a/boilerplate/cairo-boilerplate-test-surfaces-private.h
+++ b/boilerplate/cairo-boilerplate-test-surfaces-private.h
@@ -38,6 +38,17 @@ _cairo_boilerplate_test_fallback_create_surface (const char *name,
int id,
void **closure);
+cairo_surface_t *
+_cairo_boilerplate_test_fallback16_create_surface (const char *name,
+ cairo_content_t content,
+ int width,
+ int height,
+ int max_width,
+ int max_height,
+ cairo_boilerplate_mode_t mode,
+ int id,
+ void **closure);
+
cairo_surface_t *
_cairo_boilerplate_test_meta_create_surface (const char *name,
diff --git a/boilerplate/cairo-boilerplate-test-surfaces.c b/boilerplate/cairo-boilerplate-test-surfaces.c
index f6fd63af8..644b2787b 100644
--- a/boilerplate/cairo-boilerplate-test-surfaces.c
+++ b/boilerplate/cairo-boilerplate-test-surfaces.c
@@ -28,6 +28,7 @@
#include "cairo-boilerplate-test-surfaces-private.h"
#include <test-fallback-surface.h>
+#include <test-fallback16-surface.h>
#include <test-meta-surface.h>
#include <test-paginated-surface.h>
@@ -49,6 +50,21 @@ _cairo_boilerplate_test_fallback_create_surface (const char *name,
}
cairo_surface_t *
+_cairo_boilerplate_test_fallback16_create_surface (const char *name,
+ cairo_content_t content,
+ int width,
+ int height,
+ int max_width,
+ int max_height,
+ cairo_boilerplate_mode_t mode,
+ int id,
+ void **closure)
+{
+ *closure = NULL;
+ return _cairo_test_fallback16_surface_create (content, width, height);
+}
+
+cairo_surface_t *
_cairo_boilerplate_test_meta_create_surface (const char *name,
cairo_content_t content,
int width,
diff --git a/boilerplate/cairo-boilerplate.c b/boilerplate/cairo-boilerplate.c
index fcc05b877..da2a61816 100644
--- a/boilerplate/cairo-boilerplate.c
+++ b/boilerplate/cairo-boilerplate.c
@@ -311,6 +311,24 @@ static cairo_boilerplate_target_t targets[] =
cairo_surface_write_to_png
},
{
+ "test-fallback16", "image", NULL,
+ CAIRO_INTERNAL_SURFACE_TYPE_TEST_FALLBACK,
+ CAIRO_CONTENT_COLOR_ALPHA, 0,
+ _cairo_boilerplate_test_fallback16_create_surface, NULL,
+ NULL,
+ _cairo_boilerplate_get_image_surface,
+ cairo_surface_write_to_png
+ },
+ {
+ "test-fallback16", "image", NULL,
+ CAIRO_INTERNAL_SURFACE_TYPE_TEST_FALLBACK,
+ CAIRO_CONTENT_COLOR, 0,
+ _cairo_boilerplate_test_fallback16_create_surface, NULL,
+ NULL,
+ _cairo_boilerplate_get_image_surface,
+ cairo_surface_write_to_png
+ },
+ {
"test-meta", "image", NULL,
CAIRO_INTERNAL_SURFACE_TYPE_TEST_META,
CAIRO_CONTENT_COLOR_ALPHA, 0,