aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/gpu/gl/GrGLGpu.cpp
diff options
context:
space:
mode:
authorGravatar vbuzinov <vbuzinov@nvidia.com>2015-08-21 05:24:24 -0700
committerGravatar Commit bot <commit-bot@chromium.org>2015-08-21 05:24:24 -0700
commitc5d58f07aa6f4c47337d769e0e2e69c79669f91a (patch)
tree99ba4e7dcff71d9db479386f61d10ab4148a2488 /src/gpu/gl/GrGLGpu.cpp
parent499ababa52f3ac4fccf957979713abe58be1584a (diff)
Use stencil ops that don't issue writes whenever possible
Minimize the number of stencil writes by using GL_KEEP whenever possible. This can positively affect the HW performance of the stencil test. BUG=skia:3952 Review URL: https://codereview.chromium.org/1288923005
Diffstat (limited to 'src/gpu/gl/GrGLGpu.cpp')
-rw-r--r--src/gpu/gl/GrGLGpu.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/gpu/gl/GrGLGpu.cpp b/src/gpu/gl/GrGLGpu.cpp
index c88b0b2ea4..e48ddf26ff 100644
--- a/src/gpu/gl/GrGLGpu.cpp
+++ b/src/gpu/gl/GrGLGpu.cpp
@@ -2118,11 +2118,11 @@ void set_gl_stencil(const GrGLInterface* gl,
// supported.
GR_GL_CALL(gl, StencilFunc(glFunc, ref, mask));
GR_GL_CALL(gl, StencilMask(writeMask));
- GR_GL_CALL(gl, StencilOp(glFailOp, glPassOp, glPassOp));
+ GR_GL_CALL(gl, StencilOp(glFailOp, GR_GL_KEEP, glPassOp));
} else {
GR_GL_CALL(gl, StencilFuncSeparate(glFace, glFunc, ref, mask));
GR_GL_CALL(gl, StencilMaskSeparate(glFace, writeMask));
- GR_GL_CALL(gl, StencilOpSeparate(glFace, glFailOp, glPassOp, glPassOp));
+ GR_GL_CALL(gl, StencilOpSeparate(glFace, glFailOp, GR_GL_KEEP, glPassOp));
}
}
}