From be81d656c53c76032fd3fe11c81402d17ec56327 Mon Sep 17 00:00:00 2001 From: Chris Wilson Date: Mon, 25 Jan 2010 11:54:24 +0000 Subject: [PATCH] clip: Create a fallback clip surface If the destination cannot support a clip surface, then we will need to use an intermediate image surface and trigger fallbacks upon use. --- src/cairo-clip.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/cairo-clip.c b/src/cairo-clip.c index f18bff26e..74af5d862 100644 --- a/src/cairo-clip.c +++ b/src/cairo-clip.c @@ -938,6 +938,11 @@ _cairo_clip_path_get_surface (cairo_clip_path_t *clip_path, CAIRO_CONTENT_ALPHA, clip_extents->width, clip_extents->height); + if (surface == NULL) { + surface = cairo_image_surface_create (CAIRO_FORMAT_A8, + clip_extents->width, + clip_extents->height); + } if (unlikely (surface->status)) return surface;