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

Unified Diff: content/gpu/gpu_child_thread.cc

Issue 11880014: cc: Set ui/gpu/cc/ipc/upload/raster thread priorities. (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Address feedback (use static). Created 7 years, 11 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/common/child_process.cc ('k') | content/renderer/gpu/compositor_thread.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/gpu/gpu_child_thread.cc
diff --git a/content/gpu/gpu_child_thread.cc b/content/gpu/gpu_child_thread.cc
index 06fdbb2fa065bb2c3a122e0ca35260e65087038e..c16f8e81bd25891d07f1234ad4735ffe99997257 100644
--- a/content/gpu/gpu_child_thread.cc
+++ b/content/gpu/gpu_child_thread.cc
@@ -21,6 +21,11 @@
#include "ipc/ipc_sync_message_filter.h"
#include "ui/gl/gl_implementation.h"
+#if defined(OS_ANDROID)
+// TODO(epenner): Move thread priorities to base. (crbug.com/170549)
+#include <sys/resource.h>
+#endif
+
namespace content {
namespace {
@@ -125,6 +130,12 @@ void GpuChildThread::OnInitialize() {
return;
}
+#if defined(OS_ANDROID)
+ // TODO(epenner): Move thread priorities to base. (crbug.com/170549)
+ int nice_value = -6; // High priority
+ setpriority(PRIO_PROCESS, base::PlatformThread::CurrentId(), nice_value);
+#endif
+
// We don't need to pipe log messages if we are running the GPU thread in
// the browser process.
if (!in_browser_process_)
« no previous file with comments | « content/common/child_process.cc ('k') | content/renderer/gpu/compositor_thread.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698