diff --git a/cocos/core/platform/CCView.js b/cocos/core/platform/CCView.js index 028f5a119d..f94bd48ed3 100644 --- a/cocos/core/platform/CCView.js +++ b/cocos/core/platform/CCView.js @@ -556,11 +556,8 @@ class View extends EventTarget { var canvas = cc.game.canvas; var container = cc.game.container; - //canvas.width = width * this._devicePixelRatio; - //canvas.height = height * this._devicePixelRatio; - - const w = width * this._devicePixelRatio; - const h = height * this._devicePixelRatio; + canvas.width = width * this._devicePixelRatio; + canvas.height = height * this._devicePixelRatio; canvas.style.width = width + 'px'; canvas.style.height = height + 'px';