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

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: 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..67baef9cd94e50da7e0400eef8e53883b83808bd 100644
--- a/src/gpu/GrStencil.h
+++ b/src/gpu/GrStencil.h
@@ -280,7 +280,9 @@ public:
fPassOps[0] = (GrStencilOp)(uint8_t)-1;
fFlags = 0;
}
-
+ bool isValid() const {
bsalomon 2016/01/22 14:38:38 as implemented, shouldn't this be called isInvalid
Kimmo Kinnunen 2016/01/25 08:33:13 Ah, where is my head at.. I fixed this and changed
+ return fPassOps[0] == static_cast<GrStencilOp>(static_cast<uint8_t>(-1)) && fFlags == 0;
+ }
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