[cairo] [PATCH] gl: Create a new texture surface if the source surface type is gl-window

Chris Wilson chris at chris-wilson.co.uk
Thu Jul 12 10:16:37 PDT 2012


On Thu, 12 Jul 2012 16:35:30 +0800, Chuanbo Weng <strgnm at gmail.com> wrote:
> When the source surface type is gl-window, we should return unsupported
> and then create a new texture surface for it. Based on the code of
> Henry's tree.
> ---
>  src/cairo-gl-operand.c |    2 +-
>  1 files changed, 1 insertions(+), 1 deletions(-)
> 
> diff --git a/src/cairo-gl-operand.c b/src/cairo-gl-operand.c
> index 4ef3307..3a26d2c 100644
> --- a/src/cairo-gl-operand.c
> +++ b/src/cairo-gl-operand.c
> @@ -263,7 +263,7 @@ _cairo_gl_surface_operand_init (cairo_gl_operand_t *operand,
>  	return CAIRO_INT_STATUS_UNSUPPORTED;
>      }
>  
> -    if (surface->base.device && surface->base.device != dst->base.device)
> +    if (surface->base.device && (surface->base.device != dst->base.device || ! surface->tex))

I moved the test down a line for readibility. Thanks for the patch,
pushed.
-Chris

-- 
Chris Wilson, Intel Open Source Technology Centre


More information about the cairo mailing list