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

Chuanbo Weng strgnm at gmail.com
Thu Jul 12 01:35:30 PDT 2012


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))
 	return CAIRO_INT_STATUS_UNSUPPORTED;
 
     status = _resolve_multisampling (surface);
-- 
1.7.5.4



More information about the cairo mailing list