Add missing type casts for goog.partial
This commit is contained in:
@@ -182,7 +182,7 @@ ol.renderer.Layer.prototype.renderIfReadyAndVisible = function() {
|
||||
ol.renderer.Layer.prototype.scheduleExpireCache = function(frameState, tileSource) {
|
||||
if (tileSource.canExpireCache()) {
|
||||
frameState.postRenderFunctions.push(
|
||||
goog.partial(
|
||||
/** @type {ol.PostRenderFunction} */ (goog.partial(
|
||||
/**
|
||||
* @param {ol.source.Tile} tileSource Tile source.
|
||||
* @param {ol.Map} map Map.
|
||||
@@ -192,7 +192,7 @@ ol.renderer.Layer.prototype.scheduleExpireCache = function(frameState, tileSourc
|
||||
var tileSourceKey = goog.getUid(tileSource).toString();
|
||||
tileSource.expireCache(frameState.viewState.projection,
|
||||
frameState.usedTiles[tileSourceKey]);
|
||||
}, tileSource));
|
||||
}, tileSource)));
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
@@ -351,7 +351,9 @@ ol.renderer.Map.prototype.removeUnusedLayerRenderers_ = function(map, frameState
|
||||
* @protected
|
||||
*/
|
||||
ol.renderer.Map.prototype.scheduleExpireIconCache = function(frameState) {
|
||||
frameState.postRenderFunctions.push(ol.renderer.Map.expireIconCache_);
|
||||
frameState.postRenderFunctions.push(
|
||||
/** @type {ol.PostRenderFunction} */ (ol.renderer.Map.expireIconCache_)
|
||||
);
|
||||
};
|
||||
|
||||
|
||||
@@ -364,7 +366,8 @@ ol.renderer.Map.prototype.scheduleRemoveUnusedLayerRenderers = function(frameSta
|
||||
for (layerKey in this.layerRenderers_) {
|
||||
if (!(layerKey in frameState.layerStates)) {
|
||||
frameState.postRenderFunctions.push(
|
||||
this.removeUnusedLayerRenderers_.bind(this));
|
||||
/** @type {ol.PostRenderFunction} */ (this.removeUnusedLayerRenderers_.bind(this))
|
||||
);
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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)));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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);
|
||||
|
||||
@@ -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()) {
|
||||
|
||||
Reference in New Issue
Block a user