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

Unified Diff: src/gpu/GrStencil.h

Issue 1619623005: Avoid updating glPathStencilFunc unless it changes (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: eh Created 4 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 | « no previous file | src/gpu/gl/GrGLPathRendering.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/gpu/GrStencil.h
diff --git a/src/gpu/GrStencil.h b/src/gpu/GrStencil.h
index d94a45fad2bef6e6cc0a7416c511b68b74fc05f4..28042b0b2eb95ef6ad900c1bc0f6c03f3e3aa0a8 100644
--- a/src/gpu/GrStencil.h
+++ b/src/gpu/GrStencil.h
@@ -277,10 +277,14 @@ public:
void invalidate() {
// write an illegal value to the first member
- fPassOps[0] = (GrStencilOp)(uint8_t)-1;
+ fPassOps[0] = kStencilOpCount;
fFlags = 0;
}
+ bool isValid() const {
+ return fPassOps[0] < kStencilOpCount;
+ }
+
bool operator == (const GrStencilSettings& s) const {
static const size_t gCompareSize = sizeof(GrStencilSettings) -
sizeof(fFlags);
« no previous file with comments | « no previous file | src/gpu/gl/GrGLPathRendering.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698