Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 63b4c0d0 authored by Chris Craik's avatar Chris Craik Committed by Android (Google) Code Review
Browse files

Merge "Workaround to avoid polygon flashing DO NOT MERGE" into lmp-preview-dev

parents f5ccb5cc 6ef8e017
Loading
Loading
Loading
Loading
+6 −5
Original line number Diff line number Diff line
@@ -350,11 +350,12 @@ void TessellationCache::setMaxSize(uint32_t maxSize) {


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