Fixed #3369 : Fixed a bug caused by previous solution

In the previous solution, the viewport calculation doesn’t support
WebGL render mode, now the problem is fixed
Merge pull request #1313 from pandamicro/develop

Fixed #3369 : Fixed a bug caused by previous solution