From 815e5b962ef8477c344da0f0b52c1f85c9854777 Mon Sep 17 00:00:00 2001 From: Chris Wilson Date: Wed, 26 Nov 2008 17:30:29 +0000 Subject: [PATCH] [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. --- util/cairo-script/csi-replay.c | 8 ++++++++ 1 file changed, 8 insertions(+) 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