diff --git a/engine/src/flutter/impeller/renderer/backend/vulkan/swapchain/khr/khr_swapchain_impl_vk.cc b/engine/src/flutter/impeller/renderer/backend/vulkan/swapchain/khr/khr_swapchain_impl_vk.cc index 8be88832bb..fa6564e43f 100644 --- a/engine/src/flutter/impeller/renderer/backend/vulkan/swapchain/khr/khr_swapchain_impl_vk.cc +++ b/engine/src/flutter/impeller/renderer/backend/vulkan/swapchain/khr/khr_swapchain_impl_vk.cc @@ -20,11 +20,6 @@ namespace impeller { static constexpr size_t kMaxFramesInFlight = 3u; -// Number of frames to poll for orientation changes. For example `1u` means -// that the orientation will be polled every frame, while `2u` means that the -// orientation will be polled every other frame. -static constexpr size_t kPollFramesForOrientation = 1u; - struct KHRFrameSynchronizerVK { vk::UniqueFence acquire; vk::UniqueSemaphore render_ready; @@ -334,11 +329,15 @@ KHRSwapchainImplVK::AcquireResult KHRSwapchainImplVK::AcquireNextDrawable() { //---------------------------------------------------------------------------- /// Get the next image index. /// + /// @bug Non-infinite timeouts are not supported on some older Android + /// devices and the only indication we get is log spam which serves to + /// add confusion. Just use an infinite timeout instead of being + /// defensive. auto [acq_result, index] = context.GetDevice().acquireNextImageKHR( - *swapchain_, // swapchain - 1'000'000'000, // timeout (ns) 1000ms - *sync->render_ready, // signal semaphore - nullptr // fence + *swapchain_, // swapchain + std::numeric_limits::max(), // timeout (ns) + *sync->render_ready, // signal semaphore + nullptr // fence ); switch (acq_result) {