Use post render frame for tile pruning

We should discuss whether post render functions must be run after each render frame or not.  If these can be run after multiple render frames, it would make sense to increase the timeout.  As it is, it looks like post render functions are run for every render.  Hard to see what the benefit is in this case.
This commit is contained in:
Tim Schaub
2013-02-18 11:58:43 -07:00
parent 8defe3a3a1
commit e9fb83d4ee

View File

@@ -334,7 +334,7 @@ ol.renderer.canvas.VectorLayer.prototype.renderFrame =
this.renderedExtent_ = tileRangeExtent;
if (!this.pendingCachePrune_) {
this.pendingCachePrune_ = true;
goog.global.setTimeout(goog.bind(this.pruneTileCache_, this), 0);
frameState.postRenderFunctions.push(goog.bind(this.pruneTileCache_, this));
}
};