diff options
author | bsalomon <bsalomon@google.com> | 2014-11-24 07:05:15 -0800 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2014-11-24 07:05:15 -0800 |
commit | 91175f19664a62851da4ca4e0984a7c7c45b258f (patch) | |
tree | 33d518c4804c733e825bccf94c749fd78cd3203e /src/gpu/GrContext.cpp | |
parent | 52e74c6d848931e12d2ba634abc0aae881cd3be1 (diff) |
Use scratch keys for stencil buffers.
BUG=skia:2889
Review URL: https://codereview.chromium.org/747043004
Diffstat (limited to 'src/gpu/GrContext.cpp')
-rwxr-xr-x | src/gpu/GrContext.cpp | 17 |
1 files changed, 0 insertions, 17 deletions
diff --git a/src/gpu/GrContext.cpp b/src/gpu/GrContext.cpp index 657e57da33..607d3c3cc7 100755 --- a/src/gpu/GrContext.cpp +++ b/src/gpu/GrContext.cpp @@ -24,7 +24,6 @@ #include "GrPathUtils.h" #include "GrResourceCache2.h" #include "GrSoftwarePathRenderer.h" -#include "GrStencilBuffer.h" #include "GrStencilAndCoverTextContext.h" #include "GrStrokeInfo.h" #include "GrSurfacePriv.h" @@ -252,22 +251,6 @@ bool GrContext::isTextureInCache(const GrSurfaceDesc& desc, return fResourceCache2->hasContentKey(resourceKey); } -void GrContext::addStencilBuffer(GrStencilBuffer* sb) { - // TODO: Make GrStencilBuffers use the scratch mechanism rather than content keys. - ASSERT_OWNED_RESOURCE(sb); - - GrResourceKey resourceKey = GrStencilBuffer::ComputeKey(sb->width(), - sb->height(), - sb->numSamples()); - SkAssertResult(sb->cacheAccess().setContentKey(resourceKey)); -} - -GrStencilBuffer* GrContext::findAndRefStencilBuffer(int width, int height, int sampleCnt) { - GrResourceKey resourceKey = GrStencilBuffer::ComputeKey(width, height, sampleCnt); - GrGpuResource* resource = this->findAndRefCachedResource(resourceKey); - return static_cast<GrStencilBuffer*>(resource); -} - static void stretch_image(void* dst, int dstW, int dstH, |