diff options
author | John Reck <jreck@google.com> | 2015-07-23 10:27:30 -0700 |
---|---|---|
committer | John Reck <jreck@google.com> | 2015-07-23 17:34:14 +0000 |
commit | 2abf0f24af60b8644d5b61eed9666793083546ee (patch) | |
tree | 7df9cac21e2e15614c366d1a738870846c16ad2b /libs/hwui | |
parent | b3e407609f567884f9322e7b34461baa14e3f3ae (diff) | |
download | frameworks_base-2abf0f24af60b8644d5b61eed9666793083546ee.zip frameworks_base-2abf0f24af60b8644d5b61eed9666793083546ee.tar.gz frameworks_base-2abf0f24af60b8644d5b61eed9666793083546ee.tar.bz2 |
Fix a race condition that could cause lockup
Bug: 22676664
If a task is queued on a worker thread that is busy
processing a task AND a trim memory signal comes along
prior to the initial task being completed then the
tasks that were queued prior to the exit request will
never be processed.
This is bad, as when those futures are used later on, such
as in trying to delete them from the cache, they will block
waiting for the orphaned task to be finished.
Simple fix is to just never stop the worker threads. Increase
RAM usage slightly as we won't reclaim that stack space, but
this cost is fairly small
Change-Id: I818b011f9bc6ba06942fdad81c27656bd97b42d4
Diffstat (limited to 'libs/hwui')
-rw-r--r-- | libs/hwui/Caches.cpp | 5 |
1 files changed, 0 insertions, 5 deletions
diff --git a/libs/hwui/Caches.cpp b/libs/hwui/Caches.cpp index 1030451..aa73d44 100644 --- a/libs/hwui/Caches.cpp +++ b/libs/hwui/Caches.cpp @@ -248,11 +248,6 @@ void Caches::clearGarbage() { void Caches::flush(FlushMode mode) { FLUSH_LOGD("Flushing caches (mode %d)", mode); - // We must stop tasks before clearing caches - if (mode > kFlushMode_Layers) { - tasks.stop(); - } - switch (mode) { case kFlushMode_Full: textureCache.clear(); |