From fbde5df367c9fdb75fce5bf5efe58f3c2f8bdaf3 Mon Sep 17 00:00:00 2001 From: Adrian Cojocaru Date: Fri, 29 Nov 2024 16:25:19 +0200 Subject: [PATCH] Skip delay when surface is out of date --- include/mbgl/vulkan/context.hpp | 2 +- src/mbgl/vulkan/context.cpp | 17 ++++++++++------- 2 files changed, 11 insertions(+), 8 deletions(-) diff --git a/include/mbgl/vulkan/context.hpp b/include/mbgl/vulkan/context.hpp index 9b5183d8f54..08e439df3f6 100644 --- a/include/mbgl/vulkan/context.hpp +++ b/include/mbgl/vulkan/context.hpp @@ -146,7 +146,7 @@ class Context final : public gfx::Context { void enqueueDeletion(std::function&& function); void submitOneTimeCommand(const std::function& function) const; - void requestSurfaceUpdate(); + void requestSurfaceUpdate(bool useDelay = true); private: struct FrameResources { diff --git a/src/mbgl/vulkan/context.cpp b/src/mbgl/vulkan/context.cpp index a6135b9b269..9f54ebed28b 100644 --- a/src/mbgl/vulkan/context.cpp +++ b/src/mbgl/vulkan/context.cpp @@ -171,13 +171,17 @@ void Context::submitOneTimeCommand(const std::function