mirror of
https://gitlab.freedesktop.org/cairo/cairo.git
synced 2026-05-08 03:18:05 +02:00
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.
This commit is contained in:
parent
44483d843e
commit
19bc6793d1
1 changed files with 3 additions and 1 deletions
|
|
@ -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);
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue