summaryrefslogtreecommitdiff
path: root/util/cairo-script
diff options
context:
space:
mode:
authorChris Wilson <chris@chris-wilson.co.uk>2008-11-26 17:30:29 +0000
committerChris Wilson <chris@chris-wilson.co.uk>2008-11-26 17:30:29 +0000
commit815e5b962ef8477c344da0f0b52c1f85c9854777 (patch)
treed57cbacc49945331f8bbb79e35532fd164fc5305 /util/cairo-script
parent5e376523628d5e2078e395ea7263a04bacd37c47 (diff)
downloadcairo-815e5b962ef8477c344da0f0b52c1f85c9854777.tar.gz
[script] Add a fallback image surface for replay
If we do not have a native windowing surface compiled into the library, just replay the script to an image surface.
Diffstat (limited to 'util/cairo-script')
-rw-r--r--util/cairo-script/csi-replay.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/util/cairo-script/csi-replay.c b/util/cairo-script/csi-replay.c
index 5ca035f20..e5a847e46 100644
--- a/util/cairo-script/csi-replay.c
+++ b/util/cairo-script/csi-replay.c
@@ -68,6 +68,14 @@ _surface_create (void *closure,
return surface;
}
+#else
+/* fallback: just use an image surface */
+static cairo_surface_t *
+_surface_create (void *closure,
+ double width, double height)
+{
+ return cairo_image_surface_create (CAIRO_FORMAT_ARGB32, width, height);
+}
#endif
int