Skip to content
This repository was archived by the owner on Feb 25, 2025. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,9 @@ - (void)setUp {
/*io=*/thread_task_runner);
platform_view = std::make_unique<flutter::PlatformViewIOS>(
/*delegate=*/fake_delegate,
/*rendering_api=*/flutter::IOSRenderingAPI::kSoftware,
/*rendering_api=*/fake_delegate.settings_.enable_impeller
? flutter::IOSRenderingAPI::kMetal
: flutter::IOSRenderingAPI::kSoftware,
/*platform_views_controller=*/nil,
/*task_runners=*/runners,
/*worker_task_runner=*/nil,
Expand All @@ -90,8 +92,13 @@ - (void)tearDown {
}

- (void)testMsaaSampleCount {
// Default should be 1.
XCTAssertEqual(platform_view->GetIosContext()->GetMsaaSampleCount(), MsaaSampleCount::kNone);
if (fake_delegate.settings_.enable_impeller) {
// Default should be 4 for Impeller.
XCTAssertEqual(platform_view->GetIosContext()->GetMsaaSampleCount(), MsaaSampleCount::kFour);
} else {
// Default should be 1 for Skia.
XCTAssertEqual(platform_view->GetIosContext()->GetMsaaSampleCount(), MsaaSampleCount::kNone);
}

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