diff options
author | 2015-02-04 14:47:23 -0800 | |
---|---|---|
committer | 2015-02-04 14:47:23 -0800 | |
commit | 3f5175fccd39c341064e8bd86cb03dba4bc6881c (patch) | |
tree | 0fb273df4aed6739bbeba197a9f31635bdbbc7a3 /libs/hwui/TessellationCache.cpp | |
parent | 37a6ad9755cbf49929f089523c99ad187f22b63b (diff) | |
parent | c7e6b93aba9dce93aacb05b5d9f59d09eddb0329 (diff) |
resolved conflicts for merge of c7e6b93a to master
Change-Id: I4b791f37193727a0306214645f2f98cdf218cad0
Diffstat (limited to 'libs/hwui/TessellationCache.cpp')
-rw-r--r-- | libs/hwui/TessellationCache.cpp | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/libs/hwui/TessellationCache.cpp b/libs/hwui/TessellationCache.cpp index 4f028d54ae66..66de33380413 100644 --- a/libs/hwui/TessellationCache.cpp +++ b/libs/hwui/TessellationCache.cpp @@ -385,7 +385,9 @@ void TessellationCache::precacheShadows(const Matrix4* drawTransform, const Rect if (mShadowProcessor == nullptr) { mShadowProcessor = new ShadowProcessor(Caches::getInstance()); } - mShadowProcessor->add(task); + if (!mShadowProcessor->add(task)) { + mShadowProcessor->process(task); + } task->incStrong(nullptr); // not using sp<>s, so manually ref while in the cache mShadowCache.put(key, task.get()); @@ -421,7 +423,9 @@ TessellationCache::Buffer* TessellationCache::getOrCreateBuffer( if (mProcessor == nullptr) { mProcessor = new TessellationProcessor(Caches::getInstance()); } - mProcessor->add(task); + if (!mProcessor->add(task)) { + mProcessor->process(task); + } mCache.put(entry, buffer); } return buffer; |