diff options
author | Greg Daniel <egdaniel@google.com> | 2020-05-14 15:38:26 -0400 |
---|---|---|
committer | Greg Daniel <egdaniel@google.com> | 2020-05-14 15:38:26 -0400 |
commit | c7ad4080ba147d85f9fdbe3ca42ed4856fd8ebe6 (patch) | |
tree | 220ecc3f303060ecc7b2e9818331610977e88820 /libs/hwui/renderthread/CacheManager.cpp | |
parent | 938f1c115db331d6f9ca44db0a527d6b687a9e20 (diff) |
Update skia flush call APIs.
Test: manual
Change-Id: I72fa57b04f1b4ea594063ddb4ce6af9507b1fcdb
Diffstat (limited to 'libs/hwui/renderthread/CacheManager.cpp')
-rw-r--r-- | libs/hwui/renderthread/CacheManager.cpp | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/libs/hwui/renderthread/CacheManager.cpp b/libs/hwui/renderthread/CacheManager.cpp index d177855e5a7d..2bd52d4d8990 100644 --- a/libs/hwui/renderthread/CacheManager.cpp +++ b/libs/hwui/renderthread/CacheManager.cpp @@ -101,7 +101,7 @@ void CacheManager::trimMemory(TrimMemoryMode mode) { return; } - mGrContext->flush(); + mGrContext->flushAndSubmit(); switch (mode) { case TrimMemoryMode::Complete: @@ -122,14 +122,17 @@ void CacheManager::trimMemory(TrimMemoryMode mode) { // We must sync the cpu to make sure deletions of resources still queued up on the GPU actually // happen. - mGrContext->flush(kSyncCpu_GrFlushFlag, 0, nullptr); + GrFlushInfo info; + info.fFlags = kSyncCpu_GrFlushFlag; + mGrContext->flush(info); + mGrContext->submit(true); } void CacheManager::trimStaleResources() { if (!mGrContext) { return; } - mGrContext->flush(); + mGrContext->flushAndSubmit(); mGrContext->purgeResourcesNotUsedInMs(std::chrono::seconds(30)); } |