[engine] remove merge thread setting and fix default value. (flutter/engine#55810)
When I removed the configration, I neglected the line that overrode the default from settings. This opted everyone back out. :(
This commit is contained in:
@@ -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;
|
||||
|
||||
|
||||
@@ -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);
|
||||
|
||||
|
||||
@@ -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<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
|
||||
|
||||
@@ -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>(
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user