aboutsummaryrefslogtreecommitdiffhomepage
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/gpu/GrResourceCache.cpp18
1 files changed, 11 insertions, 7 deletions
diff --git a/src/gpu/GrResourceCache.cpp b/src/gpu/GrResourceCache.cpp
index afbe9b3aa1..ba6452dd59 100644
--- a/src/gpu/GrResourceCache.cpp
+++ b/src/gpu/GrResourceCache.cpp
@@ -304,14 +304,18 @@ void GrResourceCache::removeAll() {
fMaxCount = 0;
this->purgeAsNeeded();
- GrAssert(!fCache.count());
+#if GR_DEBUG
GrAssert(!fUnlockedEntryCount);
- // Items may have been detached from the cache (such as the backing texture
- // for an SkGpuDevice). The above purge would not have removed them.
- GrAssert(fEntryCount == fClientDetachedCount);
- GrAssert(fEntryBytes == fClientDetachedBytes);
- GrAssert(NULL == fHead);
- GrAssert(NULL == fTail);
+ if (!fCache.count()) {
+ // Items may have been detached from the cache (such as the backing
+ // texture for an SkGpuDevice). The above purge would not have removed
+ // them.
+ GrAssert(fEntryCount == fClientDetachedCount);
+ GrAssert(fEntryBytes == fClientDetachedBytes);
+ GrAssert(NULL == fHead);
+ GrAssert(NULL == fTail);
+ }
+#endif
fMaxBytes = savedMaxBytes;
fMaxCount = savedMaxCount;