diff options
author | Romain Guy <romainguy@google.com> | 2013-08-16 21:56:39 +0000 |
---|---|---|
committer | Android (Google) Code Review <android-gerrit@google.com> | 2013-08-16 21:56:40 +0000 |
commit | 836d335f9a43e1ebcd2291b211ac04116971124e (patch) | |
tree | c6d7b1227242b93fb29d322962a99ace4f8d946a | |
parent | 3c226bf6acea0b8dff34a2113009b6d918a3af65 (diff) | |
parent | b0a41ed3dcc34a2b4026f6cc8336796f3523aa21 (diff) | |
download | frameworks_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.cpp | 6 |
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(); |