am 836d335f: Merge "Prevent ANR in apps using drawPath() Bug #10347089" into klp-dev

* commit '836d335f9a43e1ebcd2291b211ac04116971124e':
  Prevent ANR in apps using drawPath() Bug #10347089
This commit is contained in:
Romain Guy
2013-08-16 15:03:51 -07:00
committed by Android Git Automerger

View File

@ -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();