diff options
author | 2014-11-10 10:19:06 -0800 | |
---|---|---|
committer | 2014-11-10 10:19:06 -0800 | |
commit | 8b79d23f825cd9e0f9e3bf8aaa9e209940b17ef6 (patch) | |
tree | c67085dee293d8f43cb1c8fdd73f2aaaa769fece /src/gpu/GrGpu.cpp | |
parent | 8e74b1565c5573a0be40060cebbc112fc156f26d (diff) |
Use GrResourceCache2 to service content key lookups
BUG=skia:2889
Review URL: https://codereview.chromium.org/707493002
Diffstat (limited to 'src/gpu/GrGpu.cpp')
-rw-r--r-- | src/gpu/GrGpu.cpp | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/src/gpu/GrGpu.cpp b/src/gpu/GrGpu.cpp index 64ee29bde5..ab24c5447f 100644 --- a/src/gpu/GrGpu.cpp +++ b/src/gpu/GrGpu.cpp @@ -84,10 +84,8 @@ GrTexture* GrGpu::createTexture(const GrSurfaceDesc& desc, bool GrGpu::attachStencilBufferToRenderTarget(GrRenderTarget* rt) { SkASSERT(NULL == rt->getStencilBuffer()); - GrStencilBuffer* sb = - this->getContext()->findStencilBuffer(rt->width(), - rt->height(), - rt->numSamples()); + SkAutoTUnref<GrStencilBuffer> sb( + this->getContext()->findAndRefStencilBuffer(rt->width(), rt->height(), rt->numSamples())); if (sb) { rt->setStencilBuffer(sb); bool attached = this->attachStencilBufferToRenderTarget(sb, rt); @@ -96,8 +94,7 @@ bool GrGpu::attachStencilBufferToRenderTarget(GrRenderTarget* rt) { } return attached; } - if (this->createStencilBufferForRenderTarget(rt, - rt->width(), rt->height())) { + if (this->createStencilBufferForRenderTarget(rt, rt->width(), rt->height())) { // Right now we're clearing the stencil buffer here after it is // attached to an RT for the first time. When we start matching // stencil buffers with smaller color targets this will no longer |