diff --git a/shell/common/shell.cc b/shell/common/shell.cc index d6e94c6345362..136c09b9c39d0 100644 --- a/shell/common/shell.cc +++ b/shell/common/shell.cc @@ -419,6 +419,8 @@ Shell::Shell(DartVMRef vm, volatile_path_tracker_(std::move(volatile_path_tracker)), weak_factory_gpu_(nullptr), weak_factory_(this) { + FML_CHECK(!settings.enable_software_rendering || !settings.enable_impeller) + << "Software rendering is incompatible with Impeller."; FML_CHECK(vm_) << "Must have access to VM to create a shell."; FML_DCHECK(task_runners_.IsValid()); FML_DCHECK(task_runners_.GetPlatformTaskRunner()->RunsTasksOnCurrentThread()); diff --git a/shell/common/shell_unittests.cc b/shell/common/shell_unittests.cc index 4c4c85f8b768b..2c94ca7e7ad4b 100644 --- a/shell/common/shell_unittests.cc +++ b/shell/common/shell_unittests.cc @@ -4342,6 +4342,24 @@ TEST_F(ShellTest, PrintsErrorWhenPlatformMessageSentFromWrongThread) { ASSERT_FALSE(DartVMRef::IsInstanceRunning()); } +TEST_F(ShellTest, DiesIfSoftwareRenderingAndImpellerAreEnabledDeathTest) { +#if defined(OS_FUCHSIA) + GTEST_SKIP() << "Fuchsia"; +#endif // OS_FUCHSIA + ::testing::FLAGS_gtest_death_test_style = "threadsafe"; + Settings settings = CreateSettingsForFixture(); + settings.enable_impeller = true; + settings.enable_software_rendering = true; + ThreadHost thread_host("io.flutter.test." + GetCurrentTestName() + ".", + ThreadHost::Type::Platform); + auto task_runner = thread_host.platform_thread->GetTaskRunner(); + TaskRunners task_runners("test", task_runner, task_runner, task_runner, + task_runner); + EXPECT_DEATH_IF_SUPPORTED( + CreateShell(settings, task_runners), + "Software rendering is incompatible with Impeller."); +} + } // namespace testing } // namespace flutter diff --git a/testing/scenario_app/run_ios_tests.sh b/testing/scenario_app/run_ios_tests.sh index 37ab3a76f11d0..f91a875feea22 100755 --- a/testing/scenario_app/run_ios_tests.sh +++ b/testing/scenario_app/run_ios_tests.sh @@ -78,13 +78,14 @@ echo "Running simulator tests with Impeller" echo "" # Skip testFontRenderingWhenSuppliedWithBogusFont: https://github.com/flutter/flutter/issues/113250 +# Skip golden tests that use software rendering: https://github.com/flutter/flutter/issues/131888 if set -o pipefail && xcodebuild -sdk iphonesimulator \ -scheme Scenarios \ -resultBundlePath "$RESULT_BUNDLE_PATH/ios_scenario.xcresult" \ -destination 'platform=iOS Simulator,OS=16.2,name=iPhone SE (3rd generation)' \ clean test \ FLUTTER_ENGINE="$FLUTTER_ENGINE" \ - -skip-testing "ScenariosUITests/BogusFontTextTest/testFontRenderingWhenSuppliedWithBogusFont" \ + -skip-testing "ScenariosUITests/BogusFontTextTest/testFontRenderingWhenSuppliedWithBogusFont,ScenarioUITests/PlatformViewMutationLargeClipRRectWithTransformTests/testPlatformView,ScenarioUITests/MultiplePlatformViewsTest/testPlatformView,ScenarioUITests/PlatformViewWithOtherBackdropFilterTests/testPlatformView,ScenarioUITests/TwoPlatformViewsWithOtherBackDropFilterTests/testPlatformView,ScenarioUITests/PlatformViewMutationClipPathTests/testPlatformView,ScenarioUITests/PlatformViewMutationClipRectWithTransformTests/testPlatformView,ScenarioUITests/PlatformViewGestureRecognizerTests/testRejectPolicyUtilTouchesEnded,ScenarioUITests/NonFullScreenFlutterViewPlatformViewUITests/testPlatformView,ScenarioUITests/PlatformViewUITests/testPlatformView,ScenarioUITests/PlatformViewMutationClipRectAfterMovedTests/testPlatformView,ScenarioUITests/PlatformViewMutationClipRectTests/testPlatformView,ScenarioUITests/TwoPlatformViewClipPathTests/testPlatformView,ScenarioUITests/MultiplePlatformViewsBackgroundForegroundTest/testPlatformView,ScenarioUITests/PlatformViewMutationOpacityTests/testPlatformView,ScenarioUITests/PlatformViewMutationClipRRectTests/testPlatformView,ScenarioUITests/PlatformViewMutationClipRRectWithTransformTests/testPlatformView,ScenarioUITests/PlatformViewMutationClipPathWithTransformTests/testPlatformView,ScenarioUITests/SpawnEngineTest/testSpawnEngineWorks,ScenarioUITests/PlatformViewRotation/testPlatformView,ScenarioUITests/TwoPlatformViewClipRRectTests/testPlatformView,ScenarioUITests/TwoPlatformViewClipRectTests/testPlatformView,ScenarioUITests/RenderingSelectionTest/testSoftwareRendering,ScenarioUITests/UnobstructedPlatformViewTests/testMultiplePlatformViewsWithOverlays,ScenarioUITests/UnobstructedPlatformViewTests/testNoOverlay,ScenarioUITests/PlatformViewMutationTransformTests/testPlatformView,ScenarioUITests/PlatformViewMutationLargeClipRRectTests/testPlatformView,ScenarioUITests/PlatformViewWithNegativeOtherBackDropFilterTests/testPlatformView" \ INFOPLIST_FILE="Scenarios/Info_Impeller.plist"; then # Plist with FLTEnableImpeller=YES echo "test success." else