We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 8a624ef commit f7e52d9Copy full SHA for f7e52d9
libs/hwui/Stencil.cpp
@@ -37,9 +37,10 @@ void Stencil::clear() {
37
void Stencil::enableTest() {
38
if (mState != kTest) {
39
enable();
40
- glStencilFunc(GL_LESS, 0x0, 0x1);
+ glStencilFunc(GL_EQUAL, 0x0, 0x1);
41
// We only want to test, let's keep everything
42
glStencilOp(GL_KEEP, GL_KEEP, GL_KEEP);
43
+ glColorMask(GL_TRUE, GL_TRUE, GL_TRUE, GL_TRUE);
44
mState = kTest;
45
}
46
@@ -50,6 +51,7 @@ void Stencil::enableWrite() {
50
51
glStencilFunc(GL_ALWAYS, 0x1, 0x1);
52
// The test always passes so the first two values are meaningless
53
glStencilOp(GL_KEEP, GL_KEEP, GL_REPLACE);
54
+ glColorMask(GL_FALSE, GL_FALSE, GL_FALSE, GL_FALSE);
55
mState = kWrite;
56
57
0 commit comments