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

Commit f9dc5cf

Browse files
committed
migrated straggler tests
1 parent 979390d commit f9dc5cf

File tree

2 files changed

+22
-8
lines changed

2 files changed

+22
-8
lines changed

impeller/aiks/aiks_blend_unittests.cc

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -132,11 +132,8 @@ TEST_P(AiksTest, PaintBlendModeIsRespected) {
132132

133133
// Bug: https://github.com/flutter/flutter/issues/142549
134134
TEST_P(AiksTest, BlendModePlusAlphaWideGamut) {
135-
if (GetParam() != PlaygroundBackend::kMetal) {
136-
GTEST_SKIP_("This backend doesn't yet support wide gamut.");
137-
}
138135
EXPECT_EQ(GetContext()->GetCapabilities()->GetDefaultColorFormat(),
139-
PixelFormat::kR16G16B16A16Float);
136+
PixelFormat::kB10G10R10A10XR);
140137
auto texture = CreateTextureForFixture("airplane.jpg",
141138
/*enable_mipmapping=*/true);
142139

@@ -158,11 +155,8 @@ TEST_P(AiksTest, BlendModePlusAlphaWideGamut) {
158155

159156
// Bug: https://github.com/flutter/flutter/issues/142549
160157
TEST_P(AiksTest, BlendModePlusAlphaColorFilterWideGamut) {
161-
if (GetParam() != PlaygroundBackend::kMetal) {
162-
GTEST_SKIP_("This backend doesn't yet support wide gamut.");
163-
}
164158
EXPECT_EQ(GetContext()->GetCapabilities()->GetDefaultColorFormat(),
165-
PixelFormat::kR16G16B16A16Float);
159+
PixelFormat::kB10G10R10A10XR);
166160
auto texture = CreateTextureForFixture("airplane.jpg",
167161
/*enable_mipmapping=*/true);
168162

impeller/golden_tests/golden_playground_test_mac.cc

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -128,6 +128,16 @@ void GoldenPlaygroundTest::TearDown() {
128128
ASSERT_FALSE(dlopen("/usr/local/lib/libMoltenVK.dylib", RTLD_NOLOAD));
129129
}
130130

131+
namespace {
132+
bool DoesSupportWideGamutTests() {
133+
#ifdef __arm64__
134+
return true;
135+
#else
136+
return false;
137+
#endif
138+
}
139+
} // namespace
140+
131141
void GoldenPlaygroundTest::SetUp() {
132142
std::filesystem::path testing_assets_path =
133143
flutter::testing::GetTestingAssetsPath();
@@ -142,17 +152,27 @@ void GoldenPlaygroundTest::SetUp() {
142152
bool enable_wide_gamut = test_name.find("WideGamut_") != std::string::npos;
143153
switch (GetParam()) {
144154
case PlaygroundBackend::kMetal:
155+
if (!DoesSupportWideGamutTests()) {
156+
GTEST_SKIP_(
157+
"This metal device doesn't support wide gamut golden tests.");
158+
}
145159
pimpl_->screenshotter =
146160
std::make_unique<testing::MetalScreenshotter>(enable_wide_gamut);
147161
break;
148162
case PlaygroundBackend::kVulkan: {
163+
if (enable_wide_gamut) {
164+
GTEST_SKIP_("Vulkan doesn't support wide gamut golden tests.");
165+
}
149166
const std::unique_ptr<PlaygroundImpl>& playground =
150167
GetSharedVulkanPlayground(/*enable_validations=*/true);
151168
pimpl_->screenshotter =
152169
std::make_unique<testing::VulkanScreenshotter>(playground);
153170
break;
154171
}
155172
case PlaygroundBackend::kOpenGLES: {
173+
if (enable_wide_gamut) {
174+
GTEST_SKIP_("OpenGLES doesn't support wide gamut golden tests.");
175+
}
156176
FML_CHECK(::glfwInit() == GLFW_TRUE);
157177
PlaygroundSwitches playground_switches;
158178
playground_switches.use_angle = true;

0 commit comments

Comments
 (0)