[mutter] wayland: Only set newly_attached if the buffer changes
- From: Jasper St. Pierre <jstpierre src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [mutter] wayland: Only set newly_attached if the buffer changes
- Date: Sat, 12 Apr 2014 06:56:47 +0000 (UTC)
commit d0f0be8b033e02d1d3ac1eec77a1aeca09a32eec
Author: Jasper St. Pierre <jstpierre mecheye net>
Date: Fri Apr 11 23:24:05 2014 -0700
wayland: Only set newly_attached if the buffer changes
This cleans up the check to determine if the buffer changed,
meaning we shouldn't have to pass it around like we needed
to do before.
src/wayland/meta-wayland-surface.c | 5 ++++-
1 files changed, 4 insertions(+), 1 deletions(-)
---
diff --git a/src/wayland/meta-wayland-surface.c b/src/wayland/meta-wayland-surface.c
index 25c4f32..328a18f 100644
--- a/src/wayland/meta-wayland-surface.c
+++ b/src/wayland/meta-wayland-surface.c
@@ -150,7 +150,7 @@ commit_attached_buffer (MetaWaylandSurface *surface,
MetaWaylandDoubleBufferedState *pending)
{
/* wl_surface.attach */
- if (pending->newly_attached && surface->buffer != pending->buffer)
+ if (pending->newly_attached)
{
surface_set_buffer (surface, pending->buffer);
return TRUE;
@@ -416,6 +416,9 @@ wl_surface_attach (struct wl_client *client,
else
buffer = NULL;
+ if (surface->buffer == buffer)
+ return;
+
if (surface->pending.buffer)
wl_list_remove (&surface->pending.buffer_destroy_listener.link);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]