summaryrefslogtreecommitdiffstats
path: root/libs/hwui/renderthread
diff options
context:
space:
mode:
authorChris Craik <ccraik@google.com>2014-07-25 18:25:02 +0000
committerChris Craik <ccraik@google.com>2014-07-25 18:26:36 +0000
commit738ec3aace180018560998d1c2cdeb9ddde5fbfa (patch)
treed2ec7d0e7e83fc3f81aa5f33e70b48425b67b2b3 /libs/hwui/renderthread
parent8020721059de3ab7a0d9276fce8a19c97e373421 (diff)
downloadframeworks_base-738ec3aace180018560998d1c2cdeb9ddde5fbfa.zip
frameworks_base-738ec3aace180018560998d1c2cdeb9ddde5fbfa.tar.gz
frameworks_base-738ec3aace180018560998d1c2cdeb9ddde5fbfa.tar.bz2
Revert "Dump RenderThread stack on unresponsive"
bug:16563871 bug:16565900 bug:16555847 bug:16551643 This reverts commit ca66e06b9db6e6c921662886e4b7ddd02ac92280. Change-Id: I23e8d4eaf828b1b298126ba5f36e4e8e7451706a
Diffstat (limited to 'libs/hwui/renderthread')
-rw-r--r--libs/hwui/renderthread/DrawFrameTask.cpp3
-rw-r--r--libs/hwui/renderthread/RenderProxy.cpp3
-rw-r--r--libs/hwui/renderthread/RenderThread.cpp17
-rw-r--r--libs/hwui/renderthread/RenderThread.h6
4 files changed, 4 insertions, 25 deletions
diff --git a/libs/hwui/renderthread/DrawFrameTask.cpp b/libs/hwui/renderthread/DrawFrameTask.cpp
index 763e727..dd34e09 100644
--- a/libs/hwui/renderthread/DrawFrameTask.cpp
+++ b/libs/hwui/renderthread/DrawFrameTask.cpp
@@ -85,7 +85,8 @@ int DrawFrameTask::drawFrame(nsecs_t frameTimeNanos, nsecs_t recordDurationNanos
void DrawFrameTask::postAndWait() {
AutoMutex _lock(mLock);
- mRenderThread->queueAndWait(this, mSignal, mLock);
+ mRenderThread->queue(this);
+ mSignal.wait(mLock);
}
void DrawFrameTask::run() {
diff --git a/libs/hwui/renderthread/RenderProxy.cpp b/libs/hwui/renderthread/RenderProxy.cpp
index 1e91eb5..3f03093 100644
--- a/libs/hwui/renderthread/RenderProxy.cpp
+++ b/libs/hwui/renderthread/RenderProxy.cpp
@@ -412,7 +412,8 @@ void* RenderProxy::postAndWait(MethodInvokeRenderTask* task) {
task->setReturnPtr(&retval);
SignalingRenderTask syncTask(task, &mSyncMutex, &mSyncCondition);
AutoMutex _lock(mSyncMutex);
- mRenderThread.queueAndWait(&syncTask, mSyncCondition, mSyncMutex);
+ mRenderThread.queue(&syncTask);
+ mSyncCondition.wait(mSyncMutex);
return retval;
}
diff --git a/libs/hwui/renderthread/RenderThread.cpp b/libs/hwui/renderthread/RenderThread.cpp
index 32dc46e..03e98d5 100644
--- a/libs/hwui/renderthread/RenderThread.cpp
+++ b/libs/hwui/renderthread/RenderThread.cpp
@@ -20,7 +20,6 @@
#include <gui/DisplayEventReceiver.h>
#include <utils/Log.h>
-#include <pthread.h>
#include "../RenderState.h"
#include "CanvasContext.h"
@@ -137,7 +136,6 @@ public:
};
RenderThread::RenderThread() : Thread(true), Singleton<RenderThread>()
- , mThreadId(0)
, mNextWakeup(LLONG_MAX)
, mDisplayEventReceiver(0)
, mVsyncRequested(false)
@@ -246,7 +244,6 @@ void RenderThread::requestVsync() {
}
bool RenderThread::threadLoop() {
- mThreadId = pthread_self();
initThreadLocals();
int timeoutMillis = -1;
@@ -292,16 +289,6 @@ void RenderThread::queue(RenderTask* task) {
}
}
-void RenderThread::queueAndWait(RenderTask* task, Condition& signal, Mutex& lock) {
- static nsecs_t sTimeout = milliseconds(500);
- queue(task);
- status_t err = signal.waitRelative(lock, sTimeout);
- if (CC_UNLIKELY(err != NO_ERROR)) {
- ALOGE("Timeout waiting for RenderTherad! err=%d", err);
- nukeFromOrbit();
- }
-}
-
void RenderThread::queueAtFront(RenderTask* task) {
AutoMutex _lock(mLock);
mQueue.queueAtFront(task);
@@ -354,10 +341,6 @@ RenderTask* RenderThread::nextTask(nsecs_t* nextWakeup) {
return next;
}
-void RenderThread::nukeFromOrbit() {
- pthread_kill(mThreadId, SIGABRT);
-}
-
} /* namespace renderthread */
} /* namespace uirenderer */
} /* namespace android */
diff --git a/libs/hwui/renderthread/RenderThread.h b/libs/hwui/renderthread/RenderThread.h
index 5984373..0b91e9d 100644
--- a/libs/hwui/renderthread/RenderThread.h
+++ b/libs/hwui/renderthread/RenderThread.h
@@ -23,7 +23,6 @@
#include <set>
#include <cutils/compiler.h>
-#include <utils/Condition.h>
#include <utils/Looper.h>
#include <utils/Mutex.h>
#include <utils/Singleton.h>
@@ -74,7 +73,6 @@ public:
// RenderThread takes complete ownership of tasks that are queued
// and will delete them after they are run
ANDROID_API void queue(RenderTask* task);
- void queueAndWait(RenderTask* task, Condition& signal, Mutex& lock);
ANDROID_API void queueAtFront(RenderTask* task);
void queueDelayed(RenderTask* task, int delayMs);
void remove(RenderTask* task);
@@ -108,15 +106,11 @@ private:
void dispatchFrameCallbacks();
void requestVsync();
- // VERY DANGEROUS HANDLE WITH EXTREME CARE
- void nukeFromOrbit();
-
// Returns the next task to be run. If this returns NULL nextWakeup is set
// to the time to requery for the nextTask to run. mNextWakeup is also
// set to this time
RenderTask* nextTask(nsecs_t* nextWakeup);
- pthread_t mThreadId;
sp<Looper> mLooper;
Mutex mLock;