[mutter] wayland: Don't leak the existing texture if we already have one
- From: Jasper St. Pierre <jstpierre src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [mutter] wayland: Don't leak the existing texture if we already have one
- Date: Tue, 16 Sep 2014 18:12:33 +0000 (UTC)
commit 1de740955f82ba6b3b3c0385f0d88106b7a6c9ac
Author: Jasper St. Pierre <jstpierre mecheye net>
Date: Tue Sep 16 12:11:34 2014 -0600
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.
src/wayland/meta-wayland-surface.c | 3 +++
1 files changed, 3 insertions(+), 0 deletions(-)
---
diff --git a/src/wayland/meta-wayland-surface.c b/src/wayland/meta-wayland-surface.c
index 771154a..c231b41 100644
--- a/src/wayland/meta-wayland-surface.c
+++ b/src/wayland/meta-wayland-surface.c
@@ -151,6 +151,9 @@ ensure_buffer_texture (MetaWaylandBuffer *buffer)
CoglError *catch_error = NULL;
CoglTexture *texture;
+ if (buffer->texture)
+ return;
+
texture = COGL_TEXTURE (cogl_wayland_texture_2d_new_from_buffer (ctx,
buffer->resource,
&catch_error));
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]