aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKirill Primak <vyivel@posteo.net>2021-09-06 18:11:33 +0300
committerSimon Ser <contact@emersion.fr>2021-09-06 17:37:08 +0200
commit610f0c080568cc0ee5df6509ea28ed6c1baafea7 (patch)
tree10a12c0184eaadf09ab29d90cb732e6685403fee
parentcf56596565d0fbee360809867e4f9e759682b0bf (diff)
surface: inline surface_commit_pending()
-rw-r--r--types/wlr_surface.c26
1 files changed, 11 insertions, 15 deletions
diff --git a/types/wlr_surface.c b/types/wlr_surface.c
index 47ea2b96..15001c5c 100644
--- a/types/wlr_surface.c
+++ b/types/wlr_surface.c
@@ -496,20 +496,6 @@ static void surface_commit_state(struct wlr_surface *surface,
wlr_signal_emit_safe(&surface->events.commit, surface);
}
-static void surface_commit_pending(struct wlr_surface *surface) {
- surface_finalize_pending(surface);
-
- if (surface->role && surface->role->precommit) {
- surface->role->precommit(surface);
- }
-
- if (surface->pending.cached_state_locks > 0 || !wl_list_empty(&surface->cached)) {
- surface_cache_pending(surface);
- } else {
- surface_commit_state(surface, &surface->pending);
- }
-}
-
static bool subsurface_is_synchronized(struct wlr_subsurface *subsurface) {
while (subsurface != NULL) {
if (subsurface->synchronized) {
@@ -578,7 +564,17 @@ static void surface_handle_commit(struct wl_client *client,
subsurface_commit(subsurface);
}
- surface_commit_pending(surface);
+ surface_finalize_pending(surface);
+
+ if (surface->role && surface->role->precommit) {
+ surface->role->precommit(surface);
+ }
+
+ if (surface->pending.cached_state_locks > 0 || !wl_list_empty(&surface->cached)) {
+ surface_cache_pending(surface);
+ } else {
+ surface_commit_state(surface, &surface->pending);
+ }
wl_list_for_each(subsurface, &surface->current.subsurfaces_below, current.link) {
subsurface_parent_commit(subsurface, false);