| Index: src/gpu/GrGpu.cpp
|
| diff --git a/src/gpu/GrGpu.cpp b/src/gpu/GrGpu.cpp
|
| index 6b742c4cc3db069150cb719b262091a67cb69492..2bda594b9a37a12f8ccbbcb1a66999ec8aa24441 100644
|
| --- a/src/gpu/GrGpu.cpp
|
| +++ b/src/gpu/GrGpu.cpp
|
| @@ -13,12 +13,14 @@
|
| #include "GrContext.h"
|
| #include "GrDrawTargetCaps.h"
|
| #include "GrIndexBuffer.h"
|
| -#include "GrResourceCache2.h"
|
| #include "GrStencilBuffer.h"
|
| #include "GrVertexBuffer.h"
|
|
|
| ////////////////////////////////////////////////////////////////////////////////
|
|
|
| +#define DEBUG_INVAL_BUFFER 0xdeadcafe
|
| +#define DEBUG_INVAL_START_IDX -1
|
| +
|
| GrGpu::GrGpu(GrContext* context)
|
| : fResetTimestamp(kExpiredTimestamp+1)
|
| , fResetBits(kAll_GrBackendState)
|
| @@ -76,9 +78,8 @@ GrTexture* GrGpu::createTexture(const GrSurfaceDesc& desc,
|
|
|
| bool GrGpu::attachStencilBufferToRenderTarget(GrRenderTarget* rt) {
|
| SkASSERT(NULL == rt->getStencilBuffer());
|
| - GrResourceKey sbKey = GrStencilBuffer::ComputeKey(rt->width(), rt->height(), rt->numSamples());
|
| - SkAutoTUnref<GrStencilBuffer> sb(static_cast<GrStencilBuffer*>(
|
| - this->getContext()->getResourceCache2()->findAndRefScratchResource(sbKey)));
|
| + SkAutoTUnref<GrStencilBuffer> sb(
|
| + this->getContext()->findAndRefStencilBuffer(rt->width(), rt->height(), rt->numSamples()));
|
| if (sb) {
|
| rt->setStencilBuffer(sb);
|
| bool attached = this->attachStencilBufferToRenderTarget(sb, rt);
|
|
|