diff --git a/src/pixi/renderers/webgl/WebGLFilterManager.js b/src/pixi/renderers/webgl/WebGLFilterManager.js index a98afb4..3727ff9 100644 --- a/src/pixi/renderers/webgl/WebGLFilterManager.js +++ b/src/pixi/renderers/webgl/WebGLFilterManager.js @@ -428,6 +428,27 @@ doTest = true; } + else + { + if(tempObject.updateFilterBounds) + { + tempObject.updateFilterBounds(); + + var bounds = tempObject.filterArea; + + width = bounds.width; + height = bounds.height; + + w0 = bounds.x + w1 = bounds.x + bounds.width; + + h0 = bounds.y + h1 = bounds.y + bounds.height; + + doTest = true; + } + + } } if(doTest) diff --git a/src/pixi/renderers/webgl/WebGLFilterManager.js b/src/pixi/renderers/webgl/WebGLFilterManager.js index a98afb4..3727ff9 100644 --- a/src/pixi/renderers/webgl/WebGLFilterManager.js +++ b/src/pixi/renderers/webgl/WebGLFilterManager.js @@ -428,6 +428,27 @@ doTest = true; } + else + { + if(tempObject.updateFilterBounds) + { + tempObject.updateFilterBounds(); + + var bounds = tempObject.filterArea; + + width = bounds.width; + height = bounds.height; + + w0 = bounds.x + w1 = bounds.x + bounds.width; + + h0 = bounds.y + h1 = bounds.y + bounds.height; + + doTest = true; + } + + } } if(doTest) diff --git a/src/pixi/textures/BaseTexture.js b/src/pixi/textures/BaseTexture.js index e58bc11..8f8e265 100644 --- a/src/pixi/textures/BaseTexture.js +++ b/src/pixi/textures/BaseTexture.js @@ -75,6 +75,7 @@ scope.width = scope.source.width; scope.height = scope.source.height; + // add it to somewhere... PIXI.texturesToUpdate.push(scope); scope.dispatchEvent( { type: 'loaded', content: scope } ); @@ -119,9 +120,33 @@ PIXI.BaseTexture.prototype.updateSourceImage = function(newSrc) { - this.hasLoaded = false; - this.source.src = null; - this.source.src = newSrc; + + if(this.source._realSrc == newSrc) + { + + this.dispatchEvent( { type: 'loaded', content: this } ); + } + else + { + + this.hasLoaded = false; + this.source._realSrc = newSrc; + var scope = this; + this.source.onload = function(){ + + scope.hasLoaded = true; + scope.width = scope.source.width; + scope.height = scope.source.height; + + + // add it to somewhere... + PIXI.texturesToUpdate.push(scope); + scope.dispatchEvent( { type: 'loaded', content: scope } ); + } + + //this.source.src = null; + this.source.src = newSrc; + } } /** @@ -146,6 +171,8 @@ image.crossOrigin = ''; } image.src = imageUrl; + image._realSrc = imageUrl; + baseTexture = new PIXI.BaseTexture(image); PIXI.BaseTextureCache[imageUrl] = baseTexture; }