Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(229)

Unified Diff: content/gpu/in_process_gpu_thread.cc

Issue 1690173004: content: Increase thread priority for display critical IO threads on ChromeOS. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: cl format Created 4 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « content/gpu/gpu_process.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/gpu/in_process_gpu_thread.cc
diff --git a/content/gpu/in_process_gpu_thread.cc b/content/gpu/in_process_gpu_thread.cc
index 59a4f487e599f8949861d7322b21f49002c405de..f0a97b7cdb6c561edbb72971b596ae7f7282a70d 100644
--- a/content/gpu/in_process_gpu_thread.cc
+++ b/content/gpu/in_process_gpu_thread.cc
@@ -39,15 +39,19 @@ InProcessGpuThread::~InProcessGpuThread() {
}
void InProcessGpuThread::Init() {
+ base::ThreadPriority io_thread_priority = base::ThreadPriority::NORMAL;
+
+#if defined(OS_ANDROID)
// Call AttachCurrentThreadWithName, before any other AttachCurrentThread()
// calls. The latter causes Java VM to assign Thread-??? to the thread name.
// Please note calls to AttachCurrentThreadWithName after AttachCurrentThread
// will not change the thread name kept in Java VM.
-#if defined(OS_ANDROID)
base::android::AttachCurrentThreadWithName(thread_name());
+ // Up the priority of the |io_thread_| on Android.
+ io_thread_priority = base::ThreadPriority::DISPLAY;
#endif
- gpu_process_ = new GpuProcess();
+ gpu_process_ = new GpuProcess(io_thread_priority);
// The process object takes ownership of the thread object, so do not
// save and delete the pointer.
« no previous file with comments | « content/gpu/gpu_process.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698