summaryrefslogtreecommitdiff
path: root/libs/hwui/PathCache.cpp
diff options
context:
space:
mode:
author John Reck <jreck@google.com> 2015-02-04 21:53:47 +0000
committer Gerrit Code Review <noreply-gerritcodereview@google.com> 2015-02-04 21:53:48 +0000
commit5ad36d4591e7b3b1b74f0a213d18384f53734ab2 (patch)
treeb65334ee41c519e1a05aa9489b469b0592694728 /libs/hwui/PathCache.cpp
parentfd2c1307e66573c398ff53eab25ee82735277091 (diff)
parentc3c58e015fa30a0ad87d4af2b95b7071baa8ffe4 (diff)
Merge "Fix ANR caused by hwuiTask thread"
Diffstat (limited to 'libs/hwui/PathCache.cpp')
-rw-r--r--libs/hwui/PathCache.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/libs/hwui/PathCache.cpp b/libs/hwui/PathCache.cpp
index a3d70197cb0f..302d1a920750 100644
--- a/libs/hwui/PathCache.cpp
+++ b/libs/hwui/PathCache.cpp
@@ -493,7 +493,9 @@ void PathCache::precache(const SkPath* path, const SkPaint* paint) {
if (mProcessor == NULL) {
mProcessor = new PathProcessor(Caches::getInstance());
}
- mProcessor->add(task);
+ if (!mProcessor->add(task)) {
+ mProcessor->process(task);
+ }
}
}