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.
This commit is contained in:
Chris Wilson 2010-01-25 11:54:24 +00:00
parent c453d8ab70
commit be81d656c5

View file

@ -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;