summaryrefslogtreecommitdiff
path: root/libs/hwui/renderthread/CacheManager.cpp
diff options
context:
space:
mode:
authorChris Gross <chrisgross@google.com>2021-03-10 23:00:14 +0000
committerGerrit Code Review <noreply-gerritcodereview@google.com>2021-03-10 23:00:14 +0000
commit1cb919df825afb10aaa5e796a7f4360be2d0ffd8 (patch)
tree30edf79f5c62d947eb8086a5274ab28f847bce1a /libs/hwui/renderthread/CacheManager.cpp
parent984b7be598827be9938ce00b8f550ad4836bf67a (diff)
parent4edca1117cdcad002c57f24db04b833088f2439b (diff)
Merge changes from topic "SP1A.210222.001" into s-keystone-qcom-dev
* changes: Adapt to rename of DisplayConfig to DisplayMode. Moves assignDisplayIdLocked to the Layout class. Removes import of deprecated com.android.ims.ImsException. Remove duplicate definitions of stringToAdnStringField(). Stops enforcing uses_libs matching AndroidManifest.xml for SystemUI. Revert "CamcorderProfiles: Add 8KUHD camcorder profile" Merge SP1A.210222.001
Diffstat (limited to 'libs/hwui/renderthread/CacheManager.cpp')
-rw-r--r--libs/hwui/renderthread/CacheManager.cpp8
1 files changed, 2 insertions, 6 deletions
diff --git a/libs/hwui/renderthread/CacheManager.cpp b/libs/hwui/renderthread/CacheManager.cpp
index 85924c5e8939..d998e5031984 100644
--- a/libs/hwui/renderthread/CacheManager.cpp
+++ b/libs/hwui/renderthread/CacheManager.cpp
@@ -101,7 +101,8 @@ void CacheManager::trimMemory(TrimMemoryMode mode) {
return;
}
- mGrContext->flushAndSubmit();
+ // flush and submit all work to the gpu and wait for it to finish
+ mGrContext->flushAndSubmit(/*syncCpu=*/true);
switch (mode) {
case TrimMemoryMode::Complete:
@@ -119,11 +120,6 @@ 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({});
- mGrContext->submit(true);
}
void CacheManager::trimStaleResources() {