Use index instead of time as frame marker

This commit is contained in:
Tom Payne
2013-04-18 14:15:48 +02:00
parent 8fef7b9edd
commit 75bc61c0e0

View File

@@ -365,7 +365,7 @@ ol.renderer.webgl.Map.prototype.expireCache_ = function(map, frameState) {
textureCacheEntry = /** @type {?ol.renderer.webgl.TextureCacheEntry} */
(this.textureCache_.peekLast());
if (goog.isNull(textureCacheEntry)) {
if (+this.textureCache_.peekLastKey() == frameState.time) {
if (+this.textureCache_.peekLastKey() == frameState.index) {
break;
} else {
--this.textureCacheFrameMarkerCount_;
@@ -521,7 +521,7 @@ ol.renderer.webgl.Map.prototype.renderFrame = function(frameState) {
this.focus_ = frameState.focus;
this.textureCache_.set(frameState.time.toString(), null);
this.textureCache_.set(frameState.index.toString(), null);
++this.textureCacheFrameMarkerCount_;
goog.array.forEach(frameState.layersArray, function(layer) {