Improve type checking in ol.renderer.webgl.ImageLayer
This commit is contained in:
@@ -114,11 +114,16 @@ ol.renderer.webgl.ImageLayer.prototype.renderFrame =
|
|||||||
texture = this.createTexture_(image_);
|
texture = this.createTexture_(image_);
|
||||||
if (!goog.isNull(this.texture)) {
|
if (!goog.isNull(this.texture)) {
|
||||||
frameState.postRenderFunctions.push(
|
frameState.postRenderFunctions.push(
|
||||||
goog.partial(function(gl, texture) {
|
goog.partial(
|
||||||
if (!gl.isContextLost()) {
|
/**
|
||||||
gl.deleteTexture(texture);
|
* @param {WebGLRenderingContext} gl GL.
|
||||||
}
|
* @param {WebGLTexture} texture Texture.
|
||||||
}, gl, this.texture));
|
*/
|
||||||
|
function(gl, texture) {
|
||||||
|
if (!gl.isContextLost()) {
|
||||||
|
gl.deleteTexture(texture);
|
||||||
|
}
|
||||||
|
}, gl, this.texture));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user