summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRomain Guy <romainguy@google.com>2013-08-16 21:56:39 +0000
committerAndroid (Google) Code Review <android-gerrit@google.com>2013-08-16 21:56:40 +0000
commit836d335f9a43e1ebcd2291b211ac04116971124e (patch)
treec6d7b1227242b93fb29d322962a99ace4f8d946a
parent3c226bf6acea0b8dff34a2113009b6d918a3af65 (diff)
parentb0a41ed3dcc34a2b4026f6cc8336796f3523aa21 (diff)
downloadframeworks_base-836d335f9a43e1ebcd2291b211ac04116971124e.zip
frameworks_base-836d335f9a43e1ebcd2291b211ac04116971124e.tar.gz
frameworks_base-836d335f9a43e1ebcd2291b211ac04116971124e.tar.bz2
Merge "Prevent ANR in apps using drawPath() Bug #10347089" into klp-dev
-rw-r--r--libs/hwui/Caches.cpp6
1 files changed, 5 insertions, 1 deletions
diff --git a/libs/hwui/Caches.cpp b/libs/hwui/Caches.cpp
index 641cbc8..f9cf9a2 100644
--- a/libs/hwui/Caches.cpp
+++ b/libs/hwui/Caches.cpp
@@ -331,6 +331,11 @@ void Caches::deleteDisplayListDeferred(DisplayList* displayList) {
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();
@@ -345,7 +350,6 @@ void Caches::flush(FlushMode mode) {
fontRenderer->flush();
textureCache.flush();
pathCache.clear();
- tasks.stop();
// fall through
case kFlushMode_Layers:
layerCache.clear();