Workaround to avoid polygon flashing DO NOT MERGE
b/15539571
Temporarily disables caching of tessellation.
Change-Id: If014b8c40664711aef761eec606d28aff1859b14
diff --git a/libs/hwui/TessellationCache.cpp b/libs/hwui/TessellationCache.cpp
index 79fe4d3..e6bc873 100644
--- a/libs/hwui/TessellationCache.cpp
+++ b/libs/hwui/TessellationCache.cpp
@@ -350,11 +350,12 @@
void TessellationCache::trim() {
- uint32_t size = getSize();
- while (size > mMaxSize) {
- size -= mCache.peekOldestValue()->getSize();
- mCache.removeOldest();
- }
+ // uint32_t size = getSize();
+ // while (size > mMaxSize) {
+ // size -= mCache.peekOldestValue()->getSize();
+ // mCache.removeOldest();
+ // }
+ mCache.clear(); // Workaround caching tessellation corruption
mShadowCache.clear();
}