Issue #5968: refactor cc.LayerGradient for performance
Merge pull request #2361 from dingpinglv/Iss5968_RefactorCanvasRenderer

Issue #5968: refactor cc.LayerGradient for performance