[webkit-dev] TextureMapperGL stencil bug?
Baldeva, Arpit
abaldeva at ea.com
Wed Jul 30 18:58:35 PDT 2014
Hi,
Going through the TextureMapperGL implementation, I see that BeginClip advances the bit plane to the next
clipStack().setStencilIndex(stencilIndex * 2);
However, EndClip does not revert it back before calling clipStack().applyIfNeeded(m_context3D.get());
The applyIfNeeded disables stencil test only if stencilIndex is 1.
if (clipState.stencilIndex == 1)
context->disable(GraphicsContext3D::STENCIL_TEST);
else
context->enable(GraphicsContext3D::STENCIL_TEST);
There is no place in the code that is attempting to reverse the impact of BeginClip. Isn't a right bit shift required in the EndClip call before the applyIfNeeded call? Otherwise, I don't see how EndClip will disable stenciling test ever. The problem is probably more obvious if you have nested clipping.
Note - my observation is based simply on reading the code. Please correct me if I have missed something.
Thanks
Arpit
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.webkit.org/pipermail/webkit-dev/attachments/20140731/8944073e/attachment.html>
More information about the webkit-dev
mailing list