From c7ad4080ba147d85f9fdbe3ca42ed4856fd8ebe6 Mon Sep 17 00:00:00 2001 From: Greg Daniel Date: Thu, 14 May 2020 15:38:26 -0400 Subject: Update skia flush call APIs. Test: manual Change-Id: I72fa57b04f1b4ea594063ddb4ce6af9507b1fcdb --- libs/hwui/renderthread/CacheManager.cpp | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) (limited to 'libs/hwui/renderthread/CacheManager.cpp') 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)); } -- cgit v1.2.3