diff options
author | Chris Craik <ccraik@google.com> | 2015-10-19 17:10:19 -0700 |
---|---|---|
committer | Chris Craik <ccraik@google.com> | 2015-10-20 17:19:33 -0700 |
commit | 0a24b146cd3dacf372ce98424044423a5b2fbf2a (patch) | |
tree | 6b55b3f00ff079a67c3774bc1e1c1c4020719f67 /libs/hwui/renderthread/RenderThread.cpp | |
parent | ec3d759a34ae45f5f1d6fe1b7aa9d83ebc09048d (diff) |
Add initial OpReorderer benchmarks
Change-Id: I6ca8ea89be2159331b2ad7031769c65f54161918
Diffstat (limited to 'libs/hwui/renderthread/RenderThread.cpp')
-rw-r--r-- | libs/hwui/renderthread/RenderThread.cpp | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/libs/hwui/renderthread/RenderThread.cpp b/libs/hwui/renderthread/RenderThread.cpp index 64075f1c346a..8fcd10967e17 100644 --- a/libs/hwui/renderthread/RenderThread.cpp +++ b/libs/hwui/renderthread/RenderThread.cpp @@ -312,6 +312,16 @@ void RenderThread::queue(RenderTask* task) { } } +void RenderThread::queueAndWait(RenderTask* task) { + Mutex mutex; + Condition condition; + SignalingRenderTask syncTask(task, &mutex, &condition); + + AutoMutex _lock(mutex); + queue(&syncTask); + condition.wait(mutex); +} + void RenderThread::queueAtFront(RenderTask* task) { AutoMutex _lock(mLock); mQueue.queueAtFront(task); |