From fff343f63400be66c172b83b6dfd7f9fbbad9e4e Mon Sep 17 00:00:00 2001 From: pandamicro Date: Fri, 8 Dec 2017 14:29:03 +0800 Subject: [PATCH] Remove antialias config due to performance dropdown --- cocos2d/core/CCGame.js | 3 +-- cocos2d/core/platform/CCMacro.js | 16 ---------------- 2 files changed, 1 insertion(+), 18 deletions(-) diff --git a/cocos2d/core/CCGame.js b/cocos2d/core/CCGame.js index 39910567d2..c28aa3dce0 100644 --- a/cocos2d/core/CCGame.js +++ b/cocos2d/core/CCGame.js @@ -692,8 +692,7 @@ var game = { this._renderContext = cc._renderContext = cc.webglContext = cc.create3DContext(localCanvas, { 'stencil': true, - 'alpha': cc.macro.ENABLE_TRANSPARENT_CANVAS, - 'antialias': cc.macro.ENABLE_WEBGL_ANTIALIAS + 'alpha': cc.macro.ENABLE_TRANSPARENT_CANVAS }); } // WebGL context created successfully diff --git a/cocos2d/core/platform/CCMacro.js b/cocos2d/core/platform/CCMacro.js index ecedc15121..cec60923da 100644 --- a/cocos2d/core/platform/CCMacro.js +++ b/cocos2d/core/platform/CCMacro.js @@ -1915,22 +1915,6 @@ cc.macro = { * @default false */ ENABLE_TRANSPARENT_CANVAS: false, - - /** - * !#en - * Boolean that indicates if the WebGL context is created with `antialias` option turned on, - * default value is true, most game need it for the picture to eliminate the hard edges, - * but in some case, if you are trying to apply pixel art or using tilemaps, then you may need to turn it off. - * You can set it to false before `cc.game.run`. - * Web only. - * !#zh - * 用于设置在创建 WebGL Context 时是否开启 `antialias` 选项,默认值是 true,大多数游戏都更适合这样的效果, - * 但是如果你需要实现像素风格,或是使用 Tiledmap,那么你可能需要手动设置这个值为 false,你可以在 `cc.game.run` 之前设置这个值,否则它不会生效。 - * 仅支持 Web - * @property {Boolean} ENABLE_WEBGL_ANTIALIAS - * @default true - */ - ENABLE_WEBGL_ANTIALIAS: true }; /**