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

Unified Diff: src/gpu/GrStencilBuffer.h

Issue 815833004: Add a simpler key type for scratch resource keys. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: final fix Created 6 years 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/GrStencilAndCoverTextContext.cpp ('k') | src/gpu/GrStencilBuffer.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 187556bd4cffc654e86390f8a95f6411e9060576..11eceddb4e92cd786c801adbb3e643d722ab6991 100644
--- a/src/gpu/GrStencilBuffer.h
+++ b/src/gpu/GrStencilBuffer.h
@@ -47,7 +47,7 @@ public:
!fLastClipStackRect.contains(clipSpaceRect);
}
- static GrResourceKey ComputeKey(int width, int height, int sampleCnt);
+ static void ComputeKey(int width, int height, int sampleCnt, GrScratchKey* key);
protected:
GrStencilBuffer(GrGpu* gpu, bool isWrapped, int width, int height, int bits, int sampleCnt)
@@ -57,7 +57,9 @@ protected:
, fBits(bits)
, fSampleCnt(sampleCnt)
, fLastClipStackGenID(SkClipStack::kInvalidGenID) {
- this->setScratchKey(ComputeKey(width, height, sampleCnt));
+ GrScratchKey key;
+ ComputeKey(width, height, sampleCnt, &key);
+ this->setScratchKey(key);
fLastClipStackRect.setEmpty();
}
« no previous file with comments | « src/gpu/GrStencilAndCoverTextContext.cpp ('k') | src/gpu/GrStencilBuffer.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698