summaryrefslogtreecommitdiff
path: root/src/wayland
diff options
context:
space:
mode:
authorRay Strode <rstrode@redhat.com>2016-02-16 15:42:59 -0500
committerRay Strode <rstrode@redhat.com>2016-02-17 16:16:07 -0500
commitacd50508dcaccd42759b493924e04f19ce8a4938 (patch)
tree64f05eca7097e389f1f57ad4e4057f9a1443df38 /src/wayland
parent961166115461e84a6ec31782535585369ff528cb (diff)
downloadmutter-acd50508dcaccd42759b493924e04f19ce8a4938.tar.gz
wayland: return from toplevel commit early if no new buffer
meta_wayland_surface_toplevel_commit has a lot of logic to handle a new buffer getting attached as part of the commit. None of that code needs to run if there is no new buffer attached. This commit short-circuits that case. https://bugzilla.gnome.org/show_bug.cgi?id=761613
Diffstat (limited to 'src/wayland')
-rw-r--r--src/wayland/meta-wayland-surface.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/wayland/meta-wayland-surface.c b/src/wayland/meta-wayland-surface.c
index 129486c06..aa9824655 100644
--- a/src/wayland/meta-wayland-surface.c
+++ b/src/wayland/meta-wayland-surface.c
@@ -345,6 +345,12 @@ toplevel_surface_commit (MetaWaylandSurfaceRole *surface_role,
queue_surface_actor_frame_callbacks (surface, pending);
+ /* If there's no new buffer pending, then there's nothing else to
+ * do
+ */
+ if (!pending->newly_attached)
+ return;
+
if (META_IS_WAYLAND_SURFACE_ROLE_WL_SHELL_SURFACE (surface->role))
{
/* For wl_shell, it's equivalent to an unmap. Semantics