[cairo] [cairo-commit] src/cairo-skia-surface.cpp

RAVI NANJUNDAPPA nravi.n at samsung.com
Thu Jul 10 21:33:53 PDT 2014


Hi Chris, 

I understand your point. 
May be in such a case, where the user has not explicitly passed any format type, then we can fallback to   " _cairo_image_surface_create_with_content (content, width, height);" statement, 
which ideally should be the case (I'm using this from _cairo_gl_surface_create_similar()).
I hope this is fine ?

Thanks and Best Regards, 
N Ravi

------- Original Message -------
Sender : Chris Wilson<chris at chris-wilson.co.uk>
Date : Jul 11, 2014 00:41 (GMT+05:30)
Title : Re: [cairo] [cairo-commit] src/cairo-skia-surface.cpp

On Thu, Jul 10, 2014 at 12:08:13PM -0700, Bryce Harrington wrote:
> @@ -563,8 +570,7 @@ _cairo_skia_surface_create_similar (void *asurface,
>      if (! format_to_sk_config (_cairo_format_from_content (content),
>          config, opaque))
>      {
> - _skia_unsupported ();
> - return NULL;
> + return _cairo_surface_create_in_error (_cairo_error (CAIRO_STATUS_INVALID_FORMAT));

I was seeing if someone would spot this piece of broken code. It
disables the normal fallback handling for when skia cannot do the
request operation, and it reports an invalid format error back to the
user when their call never mentioned format
(cairo_surface_create_similar and this function are passed
cairo_content_t).
-Chris

-- 
Chris Wilson, Intel Open Source Technology Centre
-- 
cairo mailing list
cairo at cairographics.org
http://lists.cairographics.org/mailman/listinfo/cairo


More information about the cairo mailing list