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

Unified Diff: base/threading/platform_thread_android.cc

Issue 1616953003: content: Improve thread priority for raster threads. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: no ThreadPriority::BACKGROUND on mac 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
Index: base/threading/platform_thread_android.cc
diff --git a/base/threading/platform_thread_android.cc b/base/threading/platform_thread_android.cc
index 1e4ae93fcf29c657af2362b2fcae75011f539a33..e6a5ef5bd44a81ea21d9aab06366d70399197f5d 100644
--- a/base/threading/platform_thread_android.cc
+++ b/base/threading/platform_thread_android.cc
@@ -24,15 +24,13 @@ namespace base {
namespace internal {
-// - BACKGROUND is 9 due to it being the nicest value we can use that's still
-// above an Android system threshold that enables heavy throttling starting at
-// 10; we want to be lower-priority than Chrome's other threads without
-// incurring this behavior.
+// - BACKGROUND corresponds to Android's PRIORITY_BACKGROUND = 10 value and can
aelias_OOO_until_Jul13 2016/02/23 23:01:40 Could you write in the comment here that this prio
reveman 2016/02/24 17:08:54 Done.
+// result in heavy throttling.
// - DISPLAY is -6 due to being midway between Android's DISPLAY (-4) and
// URGENT_DISPLAY (-8).
-// - REALTIME_AUDIO corresponds to Android's THREAD_PRIORITY_AUDIO = -16 value.
+// - REALTIME_AUDIO corresponds to Android's PRIORITY_AUDIO = -16 value.
const ThreadPriorityToNiceValuePair kThreadPriorityToNiceValueMap[4] = {
- {ThreadPriority::BACKGROUND, 9},
+ {ThreadPriority::BACKGROUND, 10},
{ThreadPriority::NORMAL, 0},
{ThreadPriority::DISPLAY, -6},
{ThreadPriority::REALTIME_AUDIO, -16},
« no previous file with comments | « no previous file | chrome/browser/chromeos/login/chrome_restart_request.cc » ('j') | content/browser/gpu/compositor_util.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698