From 78dd9e45d7640a8bf00b438308163346bbf84cb7 Mon Sep 17 00:00:00 2001 From: jonahwilliams Date: Sun, 15 Dec 2024 15:17:46 -0800 Subject: [PATCH] [Impeller] disable AHB swapchains on all platforms. --- .../backend/vulkan/swapchain/swapchain_vk.cc | 25 ------------------- 1 file changed, 25 deletions(-) diff --git a/impeller/renderer/backend/vulkan/swapchain/swapchain_vk.cc b/impeller/renderer/backend/vulkan/swapchain/swapchain_vk.cc index 1b872778dbc33..d563436c653d8 100644 --- a/impeller/renderer/backend/vulkan/swapchain/swapchain_vk.cc +++ b/impeller/renderer/backend/vulkan/swapchain/swapchain_vk.cc @@ -56,31 +56,6 @@ std::shared_ptr SwapchainVK::Create( return nullptr; } - // TODO(147533): AHB swapchains on emulators are not functional. - auto& context_vk = ContextVK::Cast(*context); - const auto emulator = context_vk.GetDriverInfo()->IsEmulator(); - const auto should_disable_sc = - context_vk.GetShouldDisableSurfaceControlSwapchain(); - - // Try AHB swapchains first. - if (!emulator && AHBSwapchainVK::IsAvailableOnPlatform() && - !android::ShadowRealm::ShouldDisableAHB() && !should_disable_sc) { - auto ahb_swapchain = std::shared_ptr(new AHBSwapchainVK( - context, // - window.GetHandle(), // - surface, // - window.GetSize(), // - enable_msaa // - )); - - if (ahb_swapchain->IsValid()) { - return ahb_swapchain; - } else { - VALIDATION_LOG - << "Could not create AHB swapchain. Falling back to KHR variant."; - } - } - // Fallback to KHR swapchains if AHB swapchains aren't available. return Create(context, std::move(surface), window.GetSize(), enable_msaa); }