summaryrefslogtreecommitdiff
path: root/libs/hwui/thread/TaskManager.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'libs/hwui/thread/TaskManager.cpp')
-rw-r--r--libs/hwui/thread/TaskManager.cpp10
1 files changed, 10 insertions, 0 deletions
diff --git a/libs/hwui/thread/TaskManager.cpp b/libs/hwui/thread/TaskManager.cpp
index 3d2b0d948c13..cb5401cb86e8 100644
--- a/libs/hwui/thread/TaskManager.cpp
+++ b/libs/hwui/thread/TaskManager.cpp
@@ -15,6 +15,9 @@
*/
#include <sys/sysinfo.h>
+#if defined(HAVE_PTHREADS)
+#include <sys/resource.h>
+#endif
#include "TaskManager.h"
#include "Task.h"
@@ -79,6 +82,13 @@ bool TaskManager::addTaskBase(const sp<TaskBase>& task, const sp<TaskProcessorBa
// Thread
///////////////////////////////////////////////////////////////////////////////
+status_t TaskManager::WorkerThread::readyToRun() {
+#if defined(HAVE_PTHREADS)
+ setpriority(PRIO_PROCESS, 0, PRIORITY_FOREGROUND);
+#endif
+ return NO_ERROR;
+}
+
bool TaskManager::WorkerThread::threadLoop() {
mSignal.wait();
Vector<TaskWrapper> tasks;