Skip to content

Commit f4648d2

Browse files
committed
Optimize performance
1 parent 7c1dcd3 commit f4648d2

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

cocos2d/core/sprites/CCSpriteCanvasRenderCmd.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -203,9 +203,9 @@
203203
if (displayedColor.r === 255 && displayedColor.g === 255 && displayedColor.b === 255) {
204204
if (this._colorized) {
205205
this._colorized = false;
206-
var rect = cc.rect(node._rect.x, node._rect.y, node._rect.width, node._rect.height);
206+
var rect = cc.rect(node._rect);
207207
var isRotation = node._rectRotated;
208-
node.texture = this._originalTexture;
208+
node.setTexture(this._originalTexture);
209209
node.setTextureRect(rect, isRotation);
210210
}
211211
return;

0 commit comments

Comments
 (0)