Make GrContext::freeGpuResources() purge the resource cache
authorbsalomon <bsalomon@google.com>
Mon, 13 Apr 2015 18:09:56 +0000 (11:09 -0700)
committerCommit bot <commit-bot@chromium.org>
Mon, 13 Apr 2015 18:09:56 +0000 (11:09 -0700)
BUG=skia:

Review URL: https://codereview.chromium.org/1082783002

src/gpu/GrContext.cpp

index 04e3f8f..2dba56c 100755 (executable)
@@ -215,6 +215,8 @@ void GrContext::freeGpuResources() {
     // a path renderer may be holding onto resources
     SkSafeSetNull(fPathRendererChain);
     SkSafeSetNull(fSoftwarePathRenderer);
+
+    fResourceCache->purgeAllUnlocked();
 }
 
 void GrContext::getResourceCacheUsage(int* resourceCount, size_t* resourceBytes) const {