| Index: cc/raster_worker_pool.cc
|
| diff --git a/cc/raster_worker_pool.cc b/cc/raster_worker_pool.cc
|
| index 11fa5777b8d0c3e6639ad2c23d7522010c887c7f..cc10956af08b8654de5410b075d44a1a3cfbbd58 100644
|
| --- a/cc/raster_worker_pool.cc
|
| +++ b/cc/raster_worker_pool.cc
|
| @@ -13,6 +13,11 @@
|
| #include "cc/picture_pile_impl.h"
|
| #include "third_party/skia/include/core/SkDevice.h"
|
|
|
| +#if defined(OS_ANDROID)
|
| +// TODO(epenner): Move thread priorities to base. (crbug.com/170549)
|
| +#include <sys/resource.h>
|
| +#endif
|
| +
|
| namespace cc {
|
|
|
| namespace {
|
| @@ -77,6 +82,14 @@ RasterWorkerPool::Thread::~Thread() {
|
| Stop();
|
| }
|
|
|
| +void RasterWorkerPool::Thread::Init() {
|
| +#if defined(OS_ANDROID)
|
| + // TODO(epenner): Move thread priorities to base. (crbug.com/170549)
|
| + int nice_value = 10; // Idle priority.
|
| + setpriority(PRIO_PROCESS, base::PlatformThread::CurrentId(), nice_value);
|
| +#endif
|
| +}
|
| +
|
| RasterWorkerPool::RasterWorkerPool(size_t num_raster_threads) {
|
| const std::string thread_name_prefix = kRasterThreadNamePrefix;
|
| while (raster_threads_.size() < num_raster_threads) {
|
|
|