Skip to content

Commit 141a01c

Browse files
authored
Reland "[Impeller] Fail if software backend is chosen and Impeller is enabled on iOS." (flutter#46275)
Reverts flutter/engine#46217 cl/568091248 makes this safe to land again. fyi @jonahwilliams @chinmaygarde
1 parent 070e39e commit 141a01c

4 files changed

Lines changed: 270 additions & 133 deletions

File tree

shell/platform/darwin/ios/framework/Source/FlutterEnginePlatformViewTest.mm

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,9 @@ - (void)setUp {
7373
/*io=*/thread_task_runner);
7474
platform_view = std::make_unique<flutter::PlatformViewIOS>(
7575
/*delegate=*/fake_delegate,
76-
/*rendering_api=*/flutter::IOSRenderingAPI::kSoftware,
76+
/*rendering_api=*/fake_delegate.settings_.enable_impeller
77+
? flutter::IOSRenderingAPI::kMetal
78+
: flutter::IOSRenderingAPI::kSoftware,
7779
/*platform_views_controller=*/nil,
7880
/*task_runners=*/runners,
7981
/*worker_task_runner=*/nil,
@@ -91,8 +93,13 @@ - (void)tearDown {
9193
}
9294

9395
- (void)testMsaaSampleCount {
94-
// Default should be 1.
95-
XCTAssertEqual(platform_view->GetIosContext()->GetMsaaSampleCount(), MsaaSampleCount::kNone);
96+
if (fake_delegate.settings_.enable_impeller) {
97+
// Default should be 4 for Impeller.
98+
XCTAssertEqual(platform_view->GetIosContext()->GetMsaaSampleCount(), MsaaSampleCount::kFour);
99+
} else {
100+
// Default should be 1 for Skia.
101+
XCTAssertEqual(platform_view->GetIosContext()->GetMsaaSampleCount(), MsaaSampleCount::kNone);
102+
}
96103

97104
// Verify the platform view creates a new context with updated msaa_samples.
98105
// Need to use Metal, since this is ignored for Software/GL.

0 commit comments

Comments
 (0)