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

Commit 27c76207 authored by Greg Daniel's avatar Greg Daniel Committed by android-build-merger
Browse files

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

am: 663ab504

Change-Id: I7e22af48449386dde99a9ce222414376a96b6958
parents 92f4af18 663ab504
Loading
Loading
Loading
Loading
+4 −0
Original line number Diff line number Diff line
@@ -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() {