| Index: src/gpu/GrStencilBuffer.h
|
| diff --git a/src/gpu/GrStencilBuffer.h b/src/gpu/GrStencilBuffer.h
|
| index 883a982ac4c5cc3356878e46af11a9e1eb969eff..43d211458195fa5ae60730e345a33212ffea9113 100644
|
| --- a/src/gpu/GrStencilBuffer.h
|
| +++ b/src/gpu/GrStencilBuffer.h
|
| @@ -50,16 +50,18 @@ public:
|
| static void ComputeKey(int width, int height, int sampleCnt, GrScratchKey* key);
|
|
|
| protected:
|
| - GrStencilBuffer(GrGpu* gpu, int width, int height, int bits, int sampleCnt)
|
| - : GrGpuResource(gpu, kCached_LifeCycle)
|
| + GrStencilBuffer(GrGpu* gpu, LifeCycle lifeCycle, int width, int height, int bits, int sampleCnt)
|
| + : GrGpuResource(gpu, lifeCycle)
|
| , fWidth(width)
|
| , fHeight(height)
|
| , fBits(bits)
|
| , fSampleCnt(sampleCnt)
|
| , fLastClipStackGenID(SkClipStack::kInvalidGenID) {
|
| - GrScratchKey key;
|
| - ComputeKey(width, height, sampleCnt, &key);
|
| - this->setScratchKey(key);
|
| + if (kCached_LifeCycle == lifeCycle) {
|
| + GrScratchKey key;
|
| + ComputeKey(width, height, sampleCnt, &key);
|
| + this->setScratchKey(key);
|
| + }
|
| fLastClipStackRect.setEmpty();
|
| }
|
|
|
|
|