diff --git a/shell/platform/android/android_shell_holder.cc b/shell/platform/android/android_shell_holder.cc index 9b2a79e03e92c80f743caf0ecb3aa7eefe24ec60..6a71c24e232faf6632e8b550899c1577c4279376 100644 --- a/shell/platform/android/android_shell_holder.cc +++ b/shell/platform/android/android_shell_holder.cc @@ -122,6 +122,11 @@ AndroidShellHolder::AndroidShellHolder( FML_LOG(ERROR) << "Failed to set UI task runner priority"; } }); + task_runners.GetIOTaskRunner()->PostTask([]() { + if (::setpriority(PRIO_PROCESS, gettid(), 1) != 0) { + FML_LOG(ERROR) << "Failed to set IO task runner priority"; + } + }); shell_ = Shell::Create(GetDefaultPlatformData(), // window data @@ -131,6 +136,14 @@ AndroidShellHolder::AndroidShellHolder( on_create_rasterizer // rasterizer create callback ); + if (shell_) { + shell_->GetDartVM()->GetConcurrentMessageLoop()->PostTaskToAllWorkers([]() { + if (::setpriority(PRIO_PROCESS, gettid(), 1) != 0) { + FML_LOG(ERROR) << "Failed to set Workers task runner priority"; + } + }); + } + platform_view_ = weak_platform_view; FML_DCHECK(platform_view_); is_valid_ = shell_ != nullptr;