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

Unified Diff: content/child/child_process.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/child/child_process.h ('k') | content/gpu/gpu_main.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/child/child_process.cc
diff --git a/content/child/child_process.cc b/content/child/child_process.cc
index 7cd842377c0ebe46dad52f7bebb0c2b7100d6984..6d50239f14b885707427a145768343af92d8e9f8 100644
--- a/content/child/child_process.cc
+++ b/content/child/child_process.cc
@@ -34,7 +34,9 @@ base::LazyInstance<base::ThreadLocalPointer<ChildProcess> > g_lazy_tls =
LAZY_INSTANCE_INITIALIZER;
}
-ChildProcess::ChildProcess()
+ChildProcess::ChildProcess() : ChildProcess(base::ThreadPriority::NORMAL) {}
+
+ChildProcess::ChildProcess(base::ThreadPriority io_thread_priority)
: ref_count_(0),
shutdown_event_(true, false),
io_thread_("Chrome_ChildIOThread") {
@@ -45,7 +47,10 @@ ChildProcess::ChildProcess()
// We can't recover from failing to start the IO thread.
base::Thread::Options thread_options(base::MessageLoop::TYPE_IO, 0);
+ thread_options.priority = io_thread_priority;
#if defined(OS_ANDROID)
+ // TODO(reveman): Remove this in favor of setting it explicitly for each type
+ // of process.
thread_options.priority = base::ThreadPriority::DISPLAY;
#endif
CHECK(io_thread_.StartWithOptions(thread_options));
« no previous file with comments | « content/child/child_process.h ('k') | content/gpu/gpu_main.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698