Add missing type casts for goog.partial

This commit is contained in:
Frederic Junod
2016-02-03 15:33:02 +01:00
parent 81750ea6b1
commit 17b667d6e0
5 changed files with 14 additions and 9 deletions

View File

@@ -139,7 +139,7 @@ ol.renderer.webgl.ImageLayer.prototype.prepareFrame = function(frameState, layer
texture = this.createTexture_(image_);
if (this.texture) {
frameState.postRenderFunctions.push(
goog.partial(
/** @type {ol.PostRenderFunction} */ (goog.partial(
/**
* @param {WebGLRenderingContext} gl GL.
* @param {WebGLTexture} texture Texture.
@@ -148,7 +148,7 @@ ol.renderer.webgl.ImageLayer.prototype.prepareFrame = function(frameState, layer
if (!gl.isContextLost()) {
gl.deleteTexture(texture);
}
}, gl, this.texture));
}, gl, this.texture)));
}
}
}

View File

@@ -95,7 +95,7 @@ ol.renderer.webgl.Layer.prototype.bindFramebuffer = function(frameState, framebu
this.framebufferDimension != framebufferDimension) {
frameState.postRenderFunctions.push(
goog.partial(
/** @type {ol.PostRenderFunction} */ (goog.partial(
/**
* @param {WebGLRenderingContext} gl GL.
* @param {WebGLFramebuffer} framebuffer Framebuffer.
@@ -106,7 +106,7 @@ ol.renderer.webgl.Layer.prototype.bindFramebuffer = function(frameState, framebu
gl.deleteFramebuffer(framebuffer);
gl.deleteTexture(texture);
}
}, gl, this.framebuffer, this.texture));
}, gl, this.framebuffer, this.texture)));
var texture = ol.webgl.Context.createEmptyTexture(
gl, framebufferDimension, framebufferDimension);

View File

@@ -512,7 +512,9 @@ ol.renderer.webgl.Map.prototype.renderFrame = function(frameState) {
if (this.textureCache_.getCount() - this.textureCacheFrameMarkerCount_ >
ol.WEBGL_TEXTURE_CACHE_HIGH_WATER_MARK) {
frameState.postRenderFunctions.push(this.expireCache_.bind(this));
frameState.postRenderFunctions.push(
/** @type {ol.PostRenderFunction} */ (this.expireCache_.bind(this))
);
}
if (!this.tileTextureQueue_.isEmpty()) {