diff options
author | Benjamin Otte <otte@redhat.com> | 2010-06-08 04:00:02 +0200 |
---|---|---|
committer | Benjamin Otte <otte@redhat.com> | 2010-06-08 22:23:12 +0200 |
commit | 19bc6793d1d9b209d5a03a727288504b1e71f7c4 (patch) | |
tree | 794d3e8458890b61c9abff5ca49b56ecd96cfdda /src | |
parent | 44483d843e4fe1f5db5cf213f76913d683265bb4 (diff) |
gl: Only clone texture surfaces
Using non-texture surfaces as source or mask will fail, so we need to
fallback.
Caught by the subsurface-modify-child test.
Diffstat (limited to 'src')
-rw-r--r-- | src/cairo-gl-surface.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/cairo-gl-surface.c b/src/cairo-gl-surface.c index 57ee84fd..9dd55ae6 100644 --- a/src/cairo-gl-surface.c +++ b/src/cairo-gl-surface.c @@ -777,7 +777,9 @@ _cairo_gl_surface_clone_similar (void *abstract_surface, { cairo_gl_surface_t *surface = abstract_surface; - if (src->device == surface->base.device) { + /* XXX: Use GLCopyTexImage2D to clone non-texture-surfaces */ + if (src->device == surface->base.device && + _cairo_gl_surface_is_texture ((cairo_gl_surface_t *) src)) { *clone_offset_x = 0; *clone_offset_y = 0; *clone_out = cairo_surface_reference (src); |