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
This commit is contained in:
parent
9611661154
commit
acd50508dc
@ -345,6 +345,12 @@ toplevel_surface_commit (MetaWaylandSurfaceRole *surface_role,
|
|||||||
|
|
||||||
queue_surface_actor_frame_callbacks (surface, pending);
|
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))
|
if (META_IS_WAYLAND_SURFACE_ROLE_WL_SHELL_SURFACE (surface->role))
|
||||||
{
|
{
|
||||||
/* For wl_shell, it's equivalent to an unmap. Semantics
|
/* For wl_shell, it's equivalent to an unmap. Semantics
|
||||||
|
Loading…
x
Reference in New Issue
Block a user