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

Chris Wilson chris at chris-wilson.co.uk
Thu Jul 10 12:11:43 PDT 2014


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


More information about the cairo mailing list