From 435b895c4ebced80d657ca9e3a5f30cfc0bbb192 Mon Sep 17 00:00:00 2001 From: zilongshanren Date: Fri, 13 Jan 2017 11:44:09 +0800 Subject: [PATCH] fix label opacity performance issue --- cocos2d/core/label/CCSGLabelCanvasRenderCmd.js | 2 +- cocos2d/core/label/CCSGLabelWebGLRenderCmd.js | 5 ----- 2 files changed, 1 insertion(+), 6 deletions(-) diff --git a/cocos2d/core/label/CCSGLabelCanvasRenderCmd.js b/cocos2d/core/label/CCSGLabelCanvasRenderCmd.js index f4a9dbb03b..5b6d659b7f 100644 --- a/cocos2d/core/label/CCSGLabelCanvasRenderCmd.js +++ b/cocos2d/core/label/CCSGLabelCanvasRenderCmd.js @@ -46,7 +46,7 @@ this._dirtyFlag &= ~dirtyFlags.contentDirty; } - if (colorDirty || opacityDirty || (locFlag & flags.textDirty)) { + if (colorDirty || (locFlag & flags.textDirty)) { this._notifyRegionStatus && this._notifyRegionStatus(_ccsg.Node.CanvasRenderCmd.RegionStatus.Dirty); this._rebuildLabelSkin(); } diff --git a/cocos2d/core/label/CCSGLabelWebGLRenderCmd.js b/cocos2d/core/label/CCSGLabelWebGLRenderCmd.js index e2b07f1008..ee4c8d3a07 100644 --- a/cocos2d/core/label/CCSGLabelWebGLRenderCmd.js +++ b/cocos2d/core/label/CCSGLabelWebGLRenderCmd.js @@ -61,11 +61,6 @@ cc.js.mixin(proto, _ccsg.Label.TTFLabelBaker.prototype); proto.constructor = _ccsg.Label.WebGLRenderCmd; -proto._updateDisplayOpacity = function (parentOpacity) { - _ccsg.Node.WebGLRenderCmd.prototype._updateDisplayOpacity.call(this, parentOpacity); - this._rebuildLabelSkin(); -}; - proto.transform = function (parentCmd, recursive) { this.originTransform(parentCmd, recursive);