cocos2d/cocos2d-x — pull request #9170 by mannewalis (2014-11-19 18:51:08+00:00)
Title: Scissor & Stencil commands

- This change implements renderer commands for scissor and stencil.
- All uses of scissor and stencil that were previously using custom commands now use the scissor and/or stencil commands.
- commands can be nested.
- refactored the renderer visit to use a switch instead of gigantic if else statement, which should be faster and avoid branch mis-prediction.

I have tested all instances using cpp-tests and it appears to function correctly, however I think additional testing is required to ensure complete backward compatibility.

Thanks
Justin