Skip to content

Commit f7e52d9

Browse files
author
Romain Guy
committed
Finish this bit before I forget.
This code is not enabled in current builds. Change-Id: I488ec9e94889efbf2c8f3312abfed4298a76b7f1
1 parent 8a624ef commit f7e52d9

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

libs/hwui/Stencil.cpp

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,9 +37,10 @@ void Stencil::clear() {
3737
void Stencil::enableTest() {
3838
if (mState != kTest) {
3939
enable();
40-
glStencilFunc(GL_LESS, 0x0, 0x1);
40+
glStencilFunc(GL_EQUAL, 0x0, 0x1);
4141
// We only want to test, let's keep everything
4242
glStencilOp(GL_KEEP, GL_KEEP, GL_KEEP);
43+
glColorMask(GL_TRUE, GL_TRUE, GL_TRUE, GL_TRUE);
4344
mState = kTest;
4445
}
4546
}
@@ -50,6 +51,7 @@ void Stencil::enableWrite() {
5051
glStencilFunc(GL_ALWAYS, 0x1, 0x1);
5152
// The test always passes so the first two values are meaningless
5253
glStencilOp(GL_KEEP, GL_KEEP, GL_REPLACE);
54+
glColorMask(GL_FALSE, GL_FALSE, GL_FALSE, GL_FALSE);
5355
mState = kWrite;
5456
}
5557
}

0 commit comments

Comments
 (0)