diff options
| author | 2015-03-24 19:22:11 +0000 | |
|---|---|---|
| committer | 2015-03-24 19:22:11 +0000 | |
| commit | f1bbbbfc2c53a83c8950bab92e08d70a8d67b84a (patch) | |
| tree | 821547175f9f684fc5f349cf97e62404d2ae2af3 | |
| parent | ea6ae3406ff74d018d16638168f8cc776ae9153d (diff) | |
| parent | 125104f66c79156c5c70c80ee24575b296b82f96 (diff) | |
Merge branch 'master' of https://googleplex-android.googlesource.com/_direct/platform/frameworks/base
| -rw-r--r-- | libs/hwui/thread/TaskManager.cpp | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/libs/hwui/thread/TaskManager.cpp b/libs/hwui/thread/TaskManager.cpp index c69b2fd56383..f0ed0bbfedc1 100644 --- a/libs/hwui/thread/TaskManager.cpp +++ b/libs/hwui/thread/TaskManager.cpp @@ -109,8 +109,11 @@ bool TaskManager::WorkerThread::addTask(TaskWrapper task) { return false; } - Mutex::Autolock l(mLock); - ssize_t index = mTasks.add(task); + ssize_t index; + { + Mutex::Autolock l(mLock); + index = mTasks.add(task); + } mSignal.signal(); return index >= 0; |