[cairo] [PATCH 24/39] [OpenVG] Return an image surface when a similar surface is requested, workaround for not supporting OpenVG based source patterns in OpenVG.
tardyp at gmail.com
tardyp at gmail.com
Fri Jul 10 10:02:26 PDT 2009
From: Øyvind Kolås <pippin at gimp.org>
---
src/cairo-openvg-surface.c | 10 +++++++---
1 files changed, 7 insertions(+), 3 deletions(-)
diff --git a/src/cairo-openvg-surface.c b/src/cairo-openvg-surface.c
index d2d0502..babe2e8 100644
--- a/src/cairo-openvg-surface.c
+++ b/src/cairo-openvg-surface.c
@@ -62,7 +62,12 @@ _cairo_openvg_surface_create_similar (void *asurface,
int width,
int height)
{
- return cairo_openvg_surface_create (width, height);
+ /* Assuming that surface_create_simlilar will be used to create patterns
+ * filled with cairo drawings, we cannot do this with openvg thus we simply
+ * refuse to accept the request
+ */
+ return cairo_image_surface_create (CAIRO_FORMAT_ARGB32, width, height);
+ /*return cairo_openvg_surface_create (width, height);*/
}
static cairo_status_t
@@ -471,7 +476,7 @@ _cairo_openvg_setup_surface_source (cairo_openvg_surface_t *vgsurface,
if (!_cairo_surface_is_image (spat->surface))
{
- vgsurface->source_paint = 0; /* XXX */
+ printf ("EEEEK! not able to cope with pattern's surface type\n");
return CAIRO_INT_STATUS_UNSUPPORTED;
}
@@ -788,7 +793,6 @@ _cairo_openvg_surface_mask (void *asurface,
}
cairo_destroy (cr);
-
cairo_surface_destroy (image);
#endif
--
1.6.0.4
More information about the cairo
mailing list