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

Unified Diff: src/gpu/gl/GrGLPathRendering.cpp

Issue 1969693003: Revert of Separate user and raw stencil settings (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 4 years, 7 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/gl/GrGLPathRendering.h ('k') | src/gpu/gl/GrGLUtil.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/gpu/gl/GrGLPathRendering.cpp
diff --git a/src/gpu/gl/GrGLPathRendering.cpp b/src/gpu/gl/GrGLPathRendering.cpp
index 66648d847945c315d67a00c92f2f80b1b06490b1..5616f9d58ab9e65068c8c431787d6d2cf693f3d6 100644
--- a/src/gpu/gl/GrGLPathRendering.cpp
+++ b/src/gpu/gl/GrGLPathRendering.cpp
@@ -70,9 +70,9 @@
default:
SkFAIL("Unexpected path fill.");
/* fallthrough */;
- case GrStencilOp::kIncClamp:
+ case kIncClamp_StencilOp:
return GR_GL_COUNT_UP;
- case GrStencilOp::kInvert:
+ case kInvert_StencilOp:
return GR_GL_INVERT;
}
}
@@ -133,9 +133,9 @@
this->flushPathStencilSettings(*args.fStencil);
SkASSERT(!fHWPathStencilSettings.isTwoSided());
- GrGLenum fillMode =
- gr_stencil_op_to_gl_path_rendering_fill_mode(fHWPathStencilSettings.front().fPassOp);
- GrGLint writeMask = fHWPathStencilSettings.front().fWriteMask;
+ GrGLenum fillMode = gr_stencil_op_to_gl_path_rendering_fill_mode(
+ fHWPathStencilSettings.passOp(GrStencilSettings::kFront_Face));
+ GrGLint writeMask = fHWPathStencilSettings.writeMask(GrStencilSettings::kFront_Face);
if (glPath->shouldFill()) {
GL_CALL(StencilFillPath(glPath->pathID(), fillMode, writeMask));
@@ -157,9 +157,9 @@
this->flushPathStencilSettings(stencil);
SkASSERT(!fHWPathStencilSettings.isTwoSided());
- GrGLenum fillMode =
- gr_stencil_op_to_gl_path_rendering_fill_mode(fHWPathStencilSettings.front().fPassOp);
- GrGLint writeMask = fHWPathStencilSettings.front().fWriteMask;
+ GrGLenum fillMode = gr_stencil_op_to_gl_path_rendering_fill_mode(
+ fHWPathStencilSettings.passOp(GrStencilSettings::kFront_Face));
+ GrGLint writeMask = fHWPathStencilSettings.writeMask(GrStencilSettings::kFront_Face);
if (glPath->shouldStroke()) {
if (glPath->shouldFill()) {
@@ -191,8 +191,10 @@
const GrGLPathRange* glPathRange = static_cast<const GrGLPathRange*>(pathRange);
GrGLenum fillMode =
- gr_stencil_op_to_gl_path_rendering_fill_mode(fHWPathStencilSettings.front().fPassOp);
- GrGLint writeMask = fHWPathStencilSettings.front().fWriteMask;
+ gr_stencil_op_to_gl_path_rendering_fill_mode(
+ fHWPathStencilSettings.passOp(GrStencilSettings::kFront_Face));
+ GrGLint writeMask =
+ fHWPathStencilSettings.writeMask(GrStencilSettings::kFront_Face);
if (glPathRange->shouldStroke()) {
if (glPathRange->shouldFill()) {
@@ -320,15 +322,16 @@
SkASSERT(stencilSettings.isValid());
// Just the func, ref, and mask is set here. The op and write mask are params to the call
// that draws the path to the SB (glStencilFillPath)
- uint16_t ref = stencilSettings.front().fRef;
- GrStencilTest test = stencilSettings.front().fTest;
- uint16_t testMask = stencilSettings.front().fTestMask;
+ const GrStencilSettings::Face kFront_Face = GrStencilSettings::kFront_Face;
+ GrStencilFunc func = stencilSettings.func(kFront_Face);
+ uint16_t funcRef = stencilSettings.funcRef(kFront_Face);
+ uint16_t funcMask = stencilSettings.funcMask(kFront_Face);
if (!fHWPathStencilSettings.isValid() ||
- ref != fHWPathStencilSettings.front().fRef ||
- test != fHWPathStencilSettings.front().fTest ||
- testMask != fHWPathStencilSettings.front().fTestMask) {
- GL_CALL(PathStencilFunc(GrToGLStencilFunc(test), ref, testMask));
+ func != fHWPathStencilSettings.func(kFront_Face) ||
+ funcRef != fHWPathStencilSettings.funcRef(kFront_Face) ||
+ funcMask != fHWPathStencilSettings.funcMask(kFront_Face)) {
+ GL_CALL(PathStencilFunc(GrToGLStencilFunc(func), funcRef, funcMask));
}
fHWPathStencilSettings = stencilSettings;
}
« no previous file with comments | « src/gpu/gl/GrGLPathRendering.h ('k') | src/gpu/gl/GrGLUtil.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698