diff options
author | twiz@google.com <twiz@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81> | 2012-02-21 19:15:53 +0000 |
---|---|---|
committer | twiz@google.com <twiz@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81> | 2012-02-21 19:15:53 +0000 |
commit | 0ec107f396a566bac2a7787b982a76c9c27c0d2f (patch) | |
tree | 7970f0db17570f277a8e497c76b4868a7b17d86b /src/gpu | |
parent | b9682d38c1daa597c4acffd93cbd5ba72735a613 (diff) |
Remove incorrect GrAssert calls in GrResourceCache::removeAll
The asserts in GrResourceCache are too aggressive, and assume that all resources are always purged. Locked resources will not be purged.
BUG=114861
Review URL: https://codereview.appspot.com/5674096
git-svn-id: http://skia.googlecode.com/svn/trunk@3226 2bbb7eff-a529-9590-31e7-b0007b416f81
Diffstat (limited to 'src/gpu')
-rw-r--r-- | src/gpu/GrResourceCache.cpp | 18 |
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; |