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

Commit 42cf494a authored by Yichi Chen's avatar Yichi Chen Committed by Yichi Chen
Browse files

Add API to clear BlobCache when cache validation fails

SkSL shader cache requests a method to flush out entire BlobCache
when cache validation fails. Add a new API in BlobCache for the
action.

Bug: b/71800782
Test: hwui_unit_tests
Change-Id: Ife4db9a5d0523972133ec1a9744f001de050efeb
parent 24d971f4
Loading
Loading
Loading
Loading
+4 −0
Original line number Diff line number Diff line
@@ -97,6 +97,10 @@ public:
    //
    int unflatten(void const* buffer, size_t size);

    // clear flushes out all contents of the cache then the BlobCache, leaving
    // it in an empty state.
    void clear() { mCacheEntries.clear(); }

protected:
    // mMaxTotalSize is the maximum size that all cache entries can occupy. This
    // includes space for both keys and values. When a call to BlobCache::set