summaryrefslogtreecommitdiff
path: root/libs/hwui/renderthread/RenderThread.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'libs/hwui/renderthread/RenderThread.cpp')
-rw-r--r--libs/hwui/renderthread/RenderThread.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/libs/hwui/renderthread/RenderThread.cpp b/libs/hwui/renderthread/RenderThread.cpp
index 03e98d5b2f03..68033dca7c55 100644
--- a/libs/hwui/renderthread/RenderThread.cpp
+++ b/libs/hwui/renderthread/RenderThread.cpp
@@ -18,6 +18,9 @@
#include "RenderThread.h"
+#if defined(HAVE_PTHREADS)
+#include <sys/resource.h>
+#endif
#include <gui/DisplayEventReceiver.h>
#include <utils/Log.h>
@@ -244,6 +247,9 @@ void RenderThread::requestVsync() {
}
bool RenderThread::threadLoop() {
+#if defined(HAVE_PTHREADS)
+ setpriority(PRIO_PROCESS, 0, PRIORITY_DISPLAY);
+#endif
initThreadLocals();
int timeoutMillis = -1;