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

Chuanbo Weng <[email protected]>
Newsgroups gmane.comp.lib.cairo
Message-ID <[email protected]>
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

-- 
cairo mailing list
[email protected]
http://lists.cairographics.org/mailman/listinfo/cairo
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.