Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(251)

Unified Diff: src/gpu/GrClipMaskCache.h

Issue 477323006: Revert of Add GrResourceCache2. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 6 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « include/gpu/GrGpuResource.h ('k') | src/gpu/GrClipMaskManager.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/gpu/GrClipMaskCache.h
diff --git a/src/gpu/GrClipMaskCache.h b/src/gpu/GrClipMaskCache.h
index 6b484e8af83e15918b63a53704f34ab26de42378..b332c7be9b96e2daf8537344b1527bbdb414492f 100644
--- a/src/gpu/GrClipMaskCache.h
+++ b/src/gpu/GrClipMaskCache.h
@@ -41,7 +41,6 @@
// We could reuse the mask if bounds is a subset of last bounds. We'd have to communicate
// an offset to the caller.
if (back->fLastMask.texture() &&
- !back->fLastMask.texture()->wasDestroyed() &&
back->fLastBound == bounds &&
back->fLastClipGenID == clipGenID) {
return true;
@@ -180,8 +179,8 @@
return fContext;
}
- // TODO: Remove this when we hold cache keys instead of refs to textures.
- void purgeResources() {
+ void releaseResources() {
+
SkDeque::F2BIter iter(fStack);
for (GrClipStackFrame* frame = (GrClipStackFrame*) iter.next();
frame != NULL;
@@ -220,8 +219,7 @@
int32_t fLastClipGenID;
// The mask's width & height values are used by GrClipMaskManager to correctly scale the
- // texture coords for the geometry drawn with this mask. TODO: This should be a cache key
- // and not a hard ref to a texture.
+ // texture coords for the geometry drawn with this mask.
GrAutoScratchTexture fLastMask;
// fLastBound stores the bounding box of the clip mask in clip-stack space. This rect is
// used by GrClipMaskManager to position a rect and compute texture coords for the mask.
« no previous file with comments | « include/gpu/GrGpuResource.h ('k') | src/gpu/GrClipMaskManager.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698