commit | 10e23caea3106be125acea10a637789e5a15c728 | [log] [tgz] |
---|---|---|
author | bsalomon <bsalomon@google.com> | Tue Nov 25 05:52:06 2014 -0800 |
committer | Commit bot <commit-bot@chromium.org> | Tue Nov 25 05:52:06 2014 -0800 |
tree | 80c21f2ab346fc91983b02fcaa4031604803607b | |
parent | 03bee31e553100ba7814cda8351d10645500f154 [diff] [blame] |
Use scratch keys for stencil buffers. BUG=skia:2889 Committed: https://skia.googlesource.com/skia/+/91175f19664a62851da4ca4e0984a7c7c45b258f Review URL: https://codereview.chromium.org/747043004
diff --git a/src/gpu/GrResourceCache2.cpp b/src/gpu/GrResourceCache2.cpp index d3039733..3918155 100644 --- a/src/gpu/GrResourceCache2.cpp +++ b/src/gpu/GrResourceCache2.cpp
@@ -218,6 +218,11 @@ return resource; } +void GrResourceCache2::willRemoveScratchKey(const GrGpuResource* resource) { + SkASSERT(resource->cacheAccess().isScratch()); + fScratchMap.remove(resource->cacheAccess().getScratchKey(), resource); +} + bool GrResourceCache2::didSetContentKey(GrGpuResource* resource) { SkASSERT(!fPurging); SkASSERT(resource);