diff options
author | Robert Phillips <robertphillips@google.com> | 2017-09-29 09:49:41 -0400 |
---|---|---|
committer | Skia Commit-Bot <skia-commit-bot@chromium.org> | 2017-09-29 14:32:54 +0000 |
commit | 45a6f147b0dc47630e75dcfc8f9c4ce816392553 (patch) | |
tree | c62893988379149514b227ac204389633e6db437 /src/gpu | |
parent | 6e3d9950e34aac581150697e1a5a561c5acd5b88 (diff) |
Clear uniquely keyed texture proxies out of ResourceCache when it is deleted
Change-Id: Ice135dd4b6316b791276eefd522be6bd90b8b5eb
Reviewed-on: https://skia-review.googlesource.com/53261
Reviewed-by: Brian Osman <brianosman@google.com>
Reviewed-by: Stan Iliev <stani@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
Diffstat (limited to 'src/gpu')
-rw-r--r-- | src/gpu/GrResourceCache.cpp | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/gpu/GrResourceCache.cpp b/src/gpu/GrResourceCache.cpp index 6ff88fc9e7..fd39bbf29c 100644 --- a/src/gpu/GrResourceCache.cpp +++ b/src/gpu/GrResourceCache.cpp @@ -196,6 +196,13 @@ void GrResourceCache::releaseAll() { this->processFreedGpuResources(); + UniquelyKeyedProxyHash::Iter iter(&fUniquelyKeyedProxies); + for (UniquelyKeyedProxyHash::Iter iter(&fUniquelyKeyedProxies) ; !iter.done(); ++iter) { + GrTextureProxy& tmp = *iter; + + this->processInvalidProxyUniqueKey(tmp.getUniqueKey(), &tmp, false); + } + while(fNonpurgeableResources.count()) { GrGpuResource* back = *(fNonpurgeableResources.end() - 1); SkASSERT(!back->wasDestroyed()); |