From d9cab62e80487bab18b939d2071d815afc794c69 Mon Sep 17 00:00:00 2001 From: Joshua Ashton Date: Wed, 31 Aug 2022 11:54:37 +0000 Subject: [PATCH] steamcompmgr: Store per-commit tearing state in commit_t --- src/steamcompmgr.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/steamcompmgr.cpp b/src/steamcompmgr.cpp index 9c66a6d..3c713ed 100644 --- a/src/steamcompmgr.cpp +++ b/src/steamcompmgr.cpp @@ -178,6 +178,7 @@ struct commit_t std::shared_ptr vulkanTex; uint64_t commitID = 0; bool done = false; + bool async = false; }; #define MWM_HINTS_FUNCTIONS 1 @@ -765,12 +766,13 @@ destroy_buffer( struct wl_listener *listener, void * ) } static std::shared_ptr -import_commit ( struct wlr_buffer *buf ) +import_commit ( struct wlr_buffer *buf, bool async ) { std::shared_ptr commit = std::make_shared(); std::unique_lock lock( wlr_buffer_map_lock ); commit->buf = buf; + commit->async = async; auto it = wlr_buffer_map.find( buf ); if ( it != wlr_buffer_map.end() ) @@ -4512,7 +4514,7 @@ void check_new_wayland_res(xwayland_ctx_t *ctx) continue; } - std::shared_ptr newCommit = import_commit( buf ); + std::shared_ptr newCommit = import_commit( buf, wlserver_surface_is_async(tmp_queue[ i ].surf) ); int fence = -1; if ( newCommit )