Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(2960)

Issue 5674096: Remove incorrect GRAssert calls in GrResourceCache::removeAll (Closed)

Can't Edit
Can't Publish+Mail
Start Review
Created:
12 years, 8 months ago by twiz
Modified:
12 years, 8 months ago
Reviewers:
bsalomon
CC:
skia-review_googlegroups.com, mmocny_chromium.org
Base URL:
http://skia.googlecode.com/svn/trunk/
Visibility:
Public.

Description

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 Committed: https://code.google.com/p/skia/source/detail?r=3226

Patch Set 1 #

Unified diffs Side-by-side diffs Delta from patch set Stats (+11 lines, -7 lines) Patch
M src/gpu/GrResourceCache.cpp View 1 chunk +11 lines, -7 lines 0 comments Download

Messages

Total messages: 3
twiz
Brian, PTAL. I think that the assumptions in GrResouceCache::removeAll are not correct, as I've observed ...
12 years, 8 months ago (2012-02-18 01:59:35 UTC) #1
bsalomon
On 2012/02/18 01:59:35, twiz wrote: > Brian, PTAL. > > I think that the assumptions ...
12 years, 8 months ago (2012-02-21 18:36:58 UTC) #2
twiz
12 years, 8 months ago (2012-02-21 19:34:15 UTC) #3
On 2012/02/21 18:36:58, bsalomon wrote:
> On 2012/02/18 01:59:35, twiz wrote:
> > Brian, PTAL.
> > 
> > I think that the assumptions in GrResouceCache::removeAll are not correct,
as
> > I've observed failures where the cache is non-empty after a purge state:
> >  fUnlockedEntryCount = 0
> >  fEntryCount = 1
> >  fHead, fTail = ...<some pointer>
> >  fClientDetachedCount = 0
> >  fClientDetachedBytes = 0
> > 
> > Is this a valid configuration?  Can a resource be locked, yet not detached?
> 
> You're right, the assumption is wrong; resources that are locked and
undetached
> will still be present in the cache.
> 
> LGTM, but it'd also be nice to do some verification in that case (e.g. all the
> resources remaining are locke, the bytes add up, ...). You can file a Skia
Issue
> against me if you like for that.

Issue added:  http://code.google.com/p/skia/issues/detail?id=504
Sign in to reply to this message.

Powered by Google App Engine
RSS Feeds Recent Issues | This issue
This is Rietveld f62528b