Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(259)

Unified Diff: src/gpu/GrStencilBuffer.h

Issue 859013002: Make stencil buffers uncached for uncached render target textures (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: rebase Created 5 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/gpu/GrGpu.cpp ('k') | src/gpu/GrTest.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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();
}
« no previous file with comments | « src/gpu/GrGpu.cpp ('k') | src/gpu/GrTest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698