diff --git a/include/mbgl/vulkan/context.hpp b/include/mbgl/vulkan/context.hpp index e17160d65..08e439df3 100644 --- a/include/mbgl/vulkan/context.hpp +++ b/include/mbgl/vulkan/context.hpp @@ -146,7 +146,7 @@ public: void enqueueDeletion(std::function&& function); void submitOneTimeCommand(const std::function& function) const; - void requestSurfaceUpdate() { surfaceUpdateRequested = true; } + void requestSurfaceUpdate(bool useDelay = true); private: struct FrameResources { @@ -197,6 +197,7 @@ private: uint8_t frameResourceIndex = 0; std::vector frameResources; bool surfaceUpdateRequested{false}; + int32_t surfaceUpdateLatency{0}; int32_t currentFrameCount{0}; struct { diff --git a/src/mbgl/vulkan/context.cpp b/src/mbgl/vulkan/context.cpp index 1acb4d691..9f54ebed2 100644 --- a/src/mbgl/vulkan/context.cpp +++ b/src/mbgl/vulkan/context.cpp @@ -171,6 +171,19 @@ void Context::submitOneTimeCommand(const std::function