From ce92ac74513c1be3d482165a4dd3d159cda5126d Mon Sep 17 00:00:00 2001 From: Vlad Zahorodnii Date: Tue, 20 Jul 2021 10:44:38 +0300 Subject: [PATCH] Merge SurfaceInterfacePrivate::commit() and SurfaceInterfacePrivate::surface_commit() This removes an unnecessary layer of indirection. --- src/wayland/surface_interface.cpp | 15 +++++---------- src/wayland/surface_interface_p.h | 1 - 2 files changed, 5 insertions(+), 11 deletions(-) diff --git a/src/wayland/surface_interface.cpp b/src/wayland/surface_interface.cpp index 755bc0fc0b..3d1fcc6e23 100644 --- a/src/wayland/surface_interface.cpp +++ b/src/wayland/surface_interface.cpp @@ -317,7 +317,11 @@ void SurfaceInterfacePrivate::surface_set_input_region(Resource *resource, struc void SurfaceInterfacePrivate::surface_commit(Resource *resource) { Q_UNUSED(resource) - commit(); + if (subSurface) { + commitSubSurface(); + } else { + applyState(&pending); + } } void SurfaceInterfacePrivate::surface_set_buffer_transform(Resource *resource, int32_t transform) @@ -667,15 +671,6 @@ void SurfaceInterfacePrivate::applyState(SurfaceState *next) Q_EMIT q->committed(); } -void SurfaceInterfacePrivate::commit() -{ - if (subSurface) { - commitSubSurface(); - } else { - applyState(&pending); - } -} - void SurfaceInterfacePrivate::commitSubSurface() { if (subSurface->isSynchronized()) { diff --git a/src/wayland/surface_interface_p.h b/src/wayland/surface_interface_p.h index 97724b27df..d038dc4926 100644 --- a/src/wayland/surface_interface_p.h +++ b/src/wayland/surface_interface_p.h @@ -99,7 +99,6 @@ public: void commitToCache(); void commitFromCache(); - void commit(); void commitSubSurface(); QMatrix4x4 buildSurfaceToBufferMatrix(const SurfaceState *state); void applyState(SurfaceState *next);