Fixed #1615 sync to master branch and fix bug of setBlendFunc for WebGL

sync to master branch and fix bug of setBlendFunc for WebGL