diff --git a/src/core/graphics/Graphics.js b/src/core/graphics/Graphics.js index 0a9cba3..d2b8e3c 100644 --- a/src/core/graphics/Graphics.js +++ b/src/core/graphics/Graphics.js @@ -760,7 +760,6 @@ // if the tint has changed, set the graphics object to dirty. if (this._prevTint !== this.tint) { this.dirty = true; - this._prevTint = this.tint; } // this code may still be needed so leaving for now.. diff --git a/src/core/graphics/Graphics.js b/src/core/graphics/Graphics.js index 0a9cba3..d2b8e3c 100644 --- a/src/core/graphics/Graphics.js +++ b/src/core/graphics/Graphics.js @@ -760,7 +760,6 @@ // if the tint has changed, set the graphics object to dirty. if (this._prevTint !== this.tint) { this.dirty = true; - this._prevTint = this.tint; } // this code may still be needed so leaving for now.. diff --git a/src/core/renderers/canvas/utils/CanvasGraphics.js b/src/core/renderers/canvas/utils/CanvasGraphics.js index ad66340..b2d5b91 100644 --- a/src/core/renderers/canvas/utils/CanvasGraphics.js +++ b/src/core/renderers/canvas/utils/CanvasGraphics.js @@ -304,10 +304,11 @@ */ CanvasGraphics.updateGraphicsTint = function (graphics) { - if (graphics.tint === 0xFFFFFF) + if (graphics.tint === 0xFFFFFF && graphics._prevTint === graphics.tint) { return; } + graphics._prevTint = graphics.tint; var tintR = (graphics.tint >> 16 & 0xFF) / 255; var tintG = (graphics.tint >> 8 & 0xFF) / 255; diff --git a/src/core/graphics/Graphics.js b/src/core/graphics/Graphics.js index 0a9cba3..d2b8e3c 100644 --- a/src/core/graphics/Graphics.js +++ b/src/core/graphics/Graphics.js @@ -760,7 +760,6 @@ // if the tint has changed, set the graphics object to dirty. if (this._prevTint !== this.tint) { this.dirty = true; - this._prevTint = this.tint; } // this code may still be needed so leaving for now.. diff --git a/src/core/renderers/canvas/utils/CanvasGraphics.js b/src/core/renderers/canvas/utils/CanvasGraphics.js index ad66340..b2d5b91 100644 --- a/src/core/renderers/canvas/utils/CanvasGraphics.js +++ b/src/core/renderers/canvas/utils/CanvasGraphics.js @@ -304,10 +304,11 @@ */ CanvasGraphics.updateGraphicsTint = function (graphics) { - if (graphics.tint === 0xFFFFFF) + if (graphics.tint === 0xFFFFFF && graphics._prevTint === graphics.tint) { return; } + graphics._prevTint = graphics.tint; var tintR = (graphics.tint >> 16 & 0xFF) / 255; var tintG = (graphics.tint >> 8 & 0xFF) / 255; diff --git a/src/core/textures/RenderTexture.js b/src/core/textures/RenderTexture.js index c5e95a1..914da89 100644 --- a/src/core/textures/RenderTexture.js +++ b/src/core/textures/RenderTexture.js @@ -291,7 +291,6 @@ } updateTransform = !!updateTransform; - var cachedWt = displayObject.worldTransform; var wt = tempMatrix; @@ -303,6 +302,7 @@ } displayObject.worldTransform = wt; + var cachedWt = displayObject.worldTransform; // setWorld Alpha to ensure that the object is renderer at full opacity displayObject.worldAlpha = 1;