| Index: cc/resources/tile_task_worker_pool.cc
|
| diff --git a/cc/resources/tile_task_worker_pool.cc b/cc/resources/tile_task_worker_pool.cc
|
| index 1c0d6b980edfb273cbaa0bb28d0e87edd8edf309..e1eaa57bbc36aa09b03e95393d45a1c38dd48bed 100644
|
| --- a/cc/resources/tile_task_worker_pool.cc
|
| +++ b/cc/resources/tile_task_worker_pool.cc
|
| @@ -19,6 +19,8 @@
|
| namespace cc {
|
| namespace {
|
|
|
| +base::ThreadPriority g_worker_thread_priority = base::kThreadPriority_Normal;
|
| +
|
| class TileTaskGraphRunner : public TaskGraphRunner,
|
| public base::DelegateSimpleThread::Delegate {
|
| public:
|
| @@ -31,9 +33,7 @@ class TileTaskGraphRunner : public TaskGraphRunner,
|
| "CompositorTileWorker%u",
|
| static_cast<unsigned>(workers_.size() + 1)).c_str()));
|
| worker->Start();
|
| -#if defined(OS_ANDROID) || defined(OS_LINUX)
|
| - worker->SetThreadPriority(base::kThreadPriority_Background);
|
| -#endif
|
| + worker->SetThreadPriority(g_worker_thread_priority);
|
| workers_.push_back(worker.Pass());
|
| }
|
| }
|
| @@ -120,6 +120,12 @@ int TileTaskWorkerPool::GetNumWorkerThreads() {
|
| }
|
|
|
| // static
|
| +void TileTaskWorkerPool::SetWorkerThreadPriority(
|
| + base::ThreadPriority priority) {
|
| + g_worker_thread_priority = priority;
|
| +}
|
| +
|
| +// static
|
| TaskGraphRunner* TileTaskWorkerPool::GetTaskGraphRunner() {
|
| return g_task_graph_runner.Pointer();
|
| }
|
|
|