diff --git a/common/settings.h b/common/settings.h index 345cf3d977f3f..6d973fa12060f 100644 --- a/common/settings.h +++ b/common/settings.h @@ -232,10 +232,6 @@ struct Settings { // Force disable the android surface control even where supported. bool disable_surface_control = false; - // If true, the UI thread is the platform thread on supported - // platforms. - bool merged_platform_ui_thread = true; - // Log a warning during shell initialization if Impeller is not enabled. bool warn_on_impeller_opt_out = false; diff --git a/shell/common/switches.cc b/shell/common/switches.cc index de131b00fd806..0fdb14827aac9 100644 --- a/shell/common/switches.cc +++ b/shell/common/switches.cc @@ -360,9 +360,6 @@ Settings SettingsFromCommandLine(const fml::CommandLine& command_line) { settings.verbose_logging = command_line.HasOption(FlagForSwitch(Switch::VerboseLogging)); - settings.merged_platform_ui_thread = command_line.HasOption( - FlagForSwitch(Switch::EnableMergedPlatformUIThread)); - command_line.GetOptionValue(FlagForSwitch(Switch::FlutterAssetsDir), &settings.assets_path); diff --git a/shell/platform/android/android_shell_holder.cc b/shell/platform/android/android_shell_holder.cc index e86effe09bd92..6ff32d8c83298 100644 --- a/shell/platform/android/android_shell_holder.cc +++ b/shell/platform/android/android_shell_holder.cc @@ -90,9 +90,6 @@ AndroidShellHolder::AndroidShellHolder( auto thread_label = std::to_string(thread_host_count++); auto mask = ThreadHost::Type::kRaster | ThreadHost::Type::kIo; - if (!settings.merged_platform_ui_thread) { - mask |= ThreadHost::Type::kUi; - } flutter::ThreadHost::ThreadHostConfig host_config( thread_label, mask, AndroidPlatformThreadConfigSetter); @@ -139,11 +136,7 @@ AndroidShellHolder::AndroidShellHolder( fml::RefPtr platform_runner = fml::MessageLoop::GetCurrent().GetTaskRunner(); raster_runner = thread_host_->raster_thread->GetTaskRunner(); - if (settings.merged_platform_ui_thread) { - ui_runner = platform_runner; - } else { - ui_runner = thread_host_->ui_thread->GetTaskRunner(); - } + ui_runner = platform_runner; io_runner = thread_host_->io_thread->GetTaskRunner(); flutter::TaskRunners task_runners(thread_label, // label diff --git a/shell/platform/android/android_shell_holder_unittests.cc b/shell/platform/android/android_shell_holder_unittests.cc index 0a1f1ed3fcf5d..d65bfae3c392a 100644 --- a/shell/platform/android/android_shell_holder_unittests.cc +++ b/shell/platform/android/android_shell_holder_unittests.cc @@ -163,7 +163,6 @@ TEST(AndroidShellHolder, HandlePlatformMessage) { TEST(AndroidShellHolder, CreateWithMergedPlatformAndUIThread) { Settings settings; - settings.merged_platform_ui_thread = true; auto jni = std::make_shared(); auto holder = std::make_unique(settings, jni); auto window = fml::MakeRefCounted( @@ -175,19 +174,5 @@ TEST(AndroidShellHolder, CreateWithMergedPlatformAndUIThread) { holder->GetShellForTesting()->GetTaskRunners().GetPlatformTaskRunner()); } -TEST(AndroidShellHolder, CreateWithUnMergedPlatformAndUIThread) { - Settings settings; - settings.merged_platform_ui_thread = false; - auto jni = std::make_shared(); - auto holder = std::make_unique(settings, jni); - auto window = fml::MakeRefCounted( - nullptr, /*is_fake_window=*/true); - holder->GetPlatformView()->NotifyCreated(window); - - EXPECT_NE( - holder->GetShellForTesting()->GetTaskRunners().GetUITaskRunner(), - holder->GetShellForTesting()->GetTaskRunners().GetPlatformTaskRunner()); -} - } // namespace testing } // namespace flutter