Skip to content
This repository was archived by the owner on Feb 25, 2025. It is now read-only.

Commit 4c2f139

Browse files
author
Casey Hillers
authored
[Impeller] Include AndroidSurfaceVulkanImpeller behind a flag (#42033)
Fixes b/282290672 Google Testing currently does not support vulkan, and constructors like this need to be behind a flag. ## Pre-launch Checklist - [x] I read the [Contributor Guide] and followed the process outlined there for submitting PRs. - [x] I read the [Tree Hygiene] wiki page, which explains my responsibilities. - [x] I read and followed the [Flutter Style Guide] and the [C++, Objective-C, Java style guides]. - [ ] I listed at least one issue that this PR fixes in the description above. - [ ] I added new tests to check the change I am making or feature I am adding, or Hixie said the PR is test-exempt. See [testing the engine] for instructions on writing and running engine tests. - [x] I updated/added relevant documentation (doc comments with `///`). - [x] I signed the [CLA]. - [x] All existing and new tests are passing.
1 parent ab4e195 commit 4c2f139

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

shell/platform/android/platform_view_android.cc

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,9 +51,16 @@ std::unique_ptr<AndroidSurface> AndroidSurfaceFactoryImpl::CreateSurface() {
5151
}
5252
case AndroidRenderingAPI::kVulkan:
5353
FML_DCHECK(enable_impeller_);
54-
return std::make_unique<AndroidSurfaceVulkanImpeller>(
54+
// TODO(kaushikiska@): Enable this after wiring a preference for Vulkan
55+
// backend.
56+
#if false
57+
return std::make_unique<AndroidSurfaceVulkanImpeller>(
5558
std::static_pointer_cast<AndroidContextVulkanImpeller>(
5659
android_context_));
60+
#else
61+
return std::make_unique<AndroidSurfaceGLImpeller>(
62+
std::static_pointer_cast<AndroidContextGLImpeller>(android_context_));
63+
#endif
5764
default:
5865
FML_DCHECK(false);
5966
return nullptr;

0 commit comments

Comments
 (0)