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
4 changes: 0 additions & 4 deletions common/settings.h
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down
3 changes: 0 additions & 3 deletions shell/common/switches.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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);

Expand Down
9 changes: 1 addition & 8 deletions shell/platform/android/android_shell_holder.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down Expand Up @@ -139,11 +136,7 @@ AndroidShellHolder::AndroidShellHolder(
fml::RefPtr<fml::TaskRunner> 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
Expand Down
15 changes: 0 additions & 15 deletions shell/platform/android/android_shell_holder_unittests.cc
Original file line number Diff line number Diff line change
Expand Up @@ -163,7 +163,6 @@ TEST(AndroidShellHolder, HandlePlatformMessage) {

TEST(AndroidShellHolder, CreateWithMergedPlatformAndUIThread) {
Settings settings;
settings.merged_platform_ui_thread = true;
auto jni = std::make_shared<MockPlatformViewAndroidJNI>();
auto holder = std::make_unique<AndroidShellHolder>(settings, jni);
auto window = fml::MakeRefCounted<AndroidNativeWindow>(
Expand All @@ -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<MockPlatformViewAndroidJNI>();
auto holder = std::make_unique<AndroidShellHolder>(settings, jni);
auto window = fml::MakeRefCounted<AndroidNativeWindow>(
nullptr, /*is_fake_window=*/true);
holder->GetPlatformView()->NotifyCreated(window);

EXPECT_NE(
holder->GetShellForTesting()->GetTaskRunners().GetUITaskRunner(),
holder->GetShellForTesting()->GetTaskRunners().GetPlatformTaskRunner());
}

} // namespace testing
} // namespace flutter