mirror of
https://github.com/flutter/flutter.git
synced 2026-02-20 02:29:02 +08:00
[Impeller] Create the golden test screenshotter after setting the Vulkan ICD environment variable (flutter/engine#49948)
This ensures that the test process will load the SwiftShader implementation of Vulkan if a VulkanScreenshotter is instantiated.
This commit is contained in:
parent
e54858b901
commit
81277b90ed
@ -98,13 +98,7 @@ struct GoldenPlaygroundTest::GoldenPlaygroundTestImpl {
|
||||
|
||||
GoldenPlaygroundTest::GoldenPlaygroundTest()
|
||||
: typographer_context_(TypographerContextSkia::Make()),
|
||||
pimpl_(new GoldenPlaygroundTest::GoldenPlaygroundTestImpl()) {
|
||||
if (GetParam() == PlaygroundBackend::kMetal) {
|
||||
pimpl_->screenshotter = std::make_unique<testing::MetalScreenshotter>();
|
||||
} else if (GetParam() == PlaygroundBackend::kVulkan) {
|
||||
pimpl_->screenshotter = std::make_unique<testing::VulkanScreenshotter>();
|
||||
}
|
||||
}
|
||||
pimpl_(new GoldenPlaygroundTest::GoldenPlaygroundTestImpl()) {}
|
||||
|
||||
GoldenPlaygroundTest::~GoldenPlaygroundTest() = default;
|
||||
|
||||
@ -133,6 +127,12 @@ void GoldenPlaygroundTest::SetUp() {
|
||||
return;
|
||||
}
|
||||
|
||||
if (GetParam() == PlaygroundBackend::kMetal) {
|
||||
pimpl_->screenshotter = std::make_unique<testing::MetalScreenshotter>();
|
||||
} else if (GetParam() == PlaygroundBackend::kVulkan) {
|
||||
pimpl_->screenshotter = std::make_unique<testing::VulkanScreenshotter>();
|
||||
}
|
||||
|
||||
std::string test_name = GetTestName();
|
||||
if (std::find(kSkipTests.begin(), kSkipTests.end(), test_name) !=
|
||||
kSkipTests.end()) {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user