wayland: Don't leak the existing texture if we already have one
We were missing a check in ensure_buffer_texture that checked if we already had a CoglTexture bound for the buffer.
This commit is contained in:
parent
21f123c69f
commit
1de740955f
@ -151,6 +151,9 @@ ensure_buffer_texture (MetaWaylandBuffer *buffer)
|
|||||||
CoglError *catch_error = NULL;
|
CoglError *catch_error = NULL;
|
||||||
CoglTexture *texture;
|
CoglTexture *texture;
|
||||||
|
|
||||||
|
if (buffer->texture)
|
||||||
|
return;
|
||||||
|
|
||||||
texture = COGL_TEXTURE (cogl_wayland_texture_2d_new_from_buffer (ctx,
|
texture = COGL_TEXTURE (cogl_wayland_texture_2d_new_from_buffer (ctx,
|
||||||
buffer->resource,
|
buffer->resource,
|
||||||
&catch_error));
|
&catch_error));
|
||||||
|
Loading…
Reference in New Issue
Block a user