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

Side by Side Diff: base/threading/platform_thread.h

Issue 1214503002: Increase priority of raster threads on Android. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 6 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 unified diff | Download patch
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 // WARNING: You should *NOT* be using this class directly. PlatformThread is 5 // WARNING: You should *NOT* be using this class directly. PlatformThread is
6 // the low-level platform-specific abstraction to the OS's threading interface. 6 // the low-level platform-specific abstraction to the OS's threading interface.
7 // You should instead be using a message-loop driven Thread, see thread.h. 7 // You should instead be using a message-loop driven Thread, see thread.h.
8 8
9 #ifndef BASE_THREADING_PLATFORM_THREAD_H_ 9 #ifndef BASE_THREADING_PLATFORM_THREAD_H_
10 #define BASE_THREADING_PLATFORM_THREAD_H_ 10 #define BASE_THREADING_PLATFORM_THREAD_H_
(...skipping 97 matching lines...) Expand 10 before | Expand all | Expand 10 after
108 private: 108 private:
109 Handle handle_; 109 Handle handle_;
110 PlatformThreadId id_; 110 PlatformThreadId id_;
111 }; 111 };
112 112
113 const PlatformThreadId kInvalidThreadId(0); 113 const PlatformThreadId kInvalidThreadId(0);
114 114
115 // Valid values for SetThreadPriority(), listed in increasing order of 115 // Valid values for SetThreadPriority(), listed in increasing order of
116 // importance. 116 // importance.
117 enum class ThreadPriority { 117 enum class ThreadPriority {
118 // Suitable for threads that shouldn't disrupt high priority work. 118 // For threads that should be throttled under contention.
119 BACKGROUND, 119 BACKGROUND,
120 // For threads that shouldn't disrupt higher-priority work, but which produce
121 // user-visible results.
122 UI_BACKGROUND,
120 // Default priority level. 123 // Default priority level.
121 NORMAL, 124 NORMAL,
122 // Suitable for threads which generate data for the display (at ~60Hz). 125 // Suitable for threads which generate data for the display (at ~60Hz).
123 DISPLAY, 126 DISPLAY,
124 // Suitable for low-latency, glitch-resistant audio. 127 // Suitable for low-latency, glitch-resistant audio.
125 REALTIME_AUDIO, 128 REALTIME_AUDIO,
126 }; 129 };
127 130
128 // A namespace for low-level thread functions. 131 // A namespace for low-level thread functions.
129 class BASE_EXPORT PlatformThread { 132 class BASE_EXPORT PlatformThread {
(...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after
202 205
203 static ThreadPriority GetThreadPriority(PlatformThreadHandle handle); 206 static ThreadPriority GetThreadPriority(PlatformThreadHandle handle);
204 207
205 private: 208 private:
206 DISALLOW_IMPLICIT_CONSTRUCTORS(PlatformThread); 209 DISALLOW_IMPLICIT_CONSTRUCTORS(PlatformThread);
207 }; 210 };
208 211
209 } // namespace base 212 } // namespace base
210 213
211 #endif // BASE_THREADING_PLATFORM_THREAD_H_ 214 #endif // BASE_THREADING_PLATFORM_THREAD_H_
OLDNEW
« no previous file with comments | « no previous file | base/threading/platform_thread_android.cc » ('j') | base/threading/platform_thread_freebsd.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698