Merge "Make sure to sync GPU after deleting memory in trimMemory." into qt-dev

This commit is contained in:
Greg Daniel
2019-04-23 16:52:06 +00:00
committed by Android (Google) Code Review

View File

@@ -126,6 +126,10 @@ void CacheManager::trimMemory(TrimMemoryMode mode) {
SkGraphics::SetFontCacheLimit(mMaxCpuFontCacheBytes);
break;
}
// 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);
}
void CacheManager::trimStaleResources() {