Merge "Prevent ANR in apps using drawPath() Bug #10347089" into klp-dev
This commit is contained in:
@@ -331,6 +331,11 @@ void Caches::deleteDisplayListDeferred(DisplayList* displayList) {
|
|||||||
void Caches::flush(FlushMode mode) {
|
void Caches::flush(FlushMode mode) {
|
||||||
FLUSH_LOGD("Flushing caches (mode %d)", mode);
|
FLUSH_LOGD("Flushing caches (mode %d)", mode);
|
||||||
|
|
||||||
|
// We must stop tasks before clearing caches
|
||||||
|
if (mode > kFlushMode_Layers) {
|
||||||
|
tasks.stop();
|
||||||
|
}
|
||||||
|
|
||||||
switch (mode) {
|
switch (mode) {
|
||||||
case kFlushMode_Full:
|
case kFlushMode_Full:
|
||||||
textureCache.clear();
|
textureCache.clear();
|
||||||
@@ -345,7 +350,6 @@ void Caches::flush(FlushMode mode) {
|
|||||||
fontRenderer->flush();
|
fontRenderer->flush();
|
||||||
textureCache.flush();
|
textureCache.flush();
|
||||||
pathCache.clear();
|
pathCache.clear();
|
||||||
tasks.stop();
|
|
||||||
// fall through
|
// fall through
|
||||||
case kFlushMode_Layers:
|
case kFlushMode_Layers:
|
||||||
layerCache.clear();
|
layerCache.clear();
|
||||||
|
|||||||
Reference in New Issue
Block a user