@@ -24,6 +24,7 @@ goog.require('ol.layer.LayerState');
|
|||||||
* coordinateToPixelMatrix: goog.vec.Mat4.Number,
|
* coordinateToPixelMatrix: goog.vec.Mat4.Number,
|
||||||
* extent: (null|ol.Extent),
|
* extent: (null|ol.Extent),
|
||||||
* focus: ol.Coordinate,
|
* focus: ol.Coordinate,
|
||||||
|
* index: number,
|
||||||
* layersArray: Array.<ol.layer.Layer>,
|
* layersArray: Array.<ol.layer.Layer>,
|
||||||
* layerStates: Object.<number, ol.layer.LayerState>,
|
* layerStates: Object.<number, ol.layer.LayerState>,
|
||||||
* logos: Object.<string, boolean>,
|
* logos: Object.<string, boolean>,
|
||||||
|
|||||||
@@ -168,6 +168,12 @@ ol.Map = function(options) {
|
|||||||
*/
|
*/
|
||||||
this.pixelToCoordinateMatrix_ = goog.vec.Mat4.createNumber();
|
this.pixelToCoordinateMatrix_ = goog.vec.Mat4.createNumber();
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @private
|
||||||
|
* @type {number}
|
||||||
|
*/
|
||||||
|
this.frameIndex_ = 0;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @private
|
* @private
|
||||||
* @type {?ol.FrameState}
|
* @type {?ol.FrameState}
|
||||||
@@ -804,6 +810,7 @@ ol.Map.prototype.renderFrame_ = function(time) {
|
|||||||
coordinateToPixelMatrix: this.coordinateToPixelMatrix_,
|
coordinateToPixelMatrix: this.coordinateToPixelMatrix_,
|
||||||
extent: null,
|
extent: null,
|
||||||
focus: goog.isNull(this.focus_) ? view2DState.center : this.focus_,
|
focus: goog.isNull(this.focus_) ? view2DState.center : this.focus_,
|
||||||
|
index: this.frameIndex_++,
|
||||||
layersArray: layersArray,
|
layersArray: layersArray,
|
||||||
layerStates: layerStates,
|
layerStates: layerStates,
|
||||||
logos: {},
|
logos: {},
|
||||||
|
|||||||
@@ -365,7 +365,7 @@ ol.renderer.webgl.Map.prototype.expireCache_ = function(map, frameState) {
|
|||||||
textureCacheEntry = /** @type {?ol.renderer.webgl.TextureCacheEntry} */
|
textureCacheEntry = /** @type {?ol.renderer.webgl.TextureCacheEntry} */
|
||||||
(this.textureCache_.peekLast());
|
(this.textureCache_.peekLast());
|
||||||
if (goog.isNull(textureCacheEntry)) {
|
if (goog.isNull(textureCacheEntry)) {
|
||||||
if (+this.textureCache_.peekLastKey() == frameState.time) {
|
if (+this.textureCache_.peekLastKey() == frameState.index) {
|
||||||
break;
|
break;
|
||||||
} else {
|
} else {
|
||||||
--this.textureCacheFrameMarkerCount_;
|
--this.textureCacheFrameMarkerCount_;
|
||||||
@@ -521,7 +521,7 @@ ol.renderer.webgl.Map.prototype.renderFrame = function(frameState) {
|
|||||||
|
|
||||||
this.focus_ = frameState.focus;
|
this.focus_ = frameState.focus;
|
||||||
|
|
||||||
this.textureCache_.set(frameState.time.toString(), null);
|
this.textureCache_.set(frameState.index.toString(), null);
|
||||||
++this.textureCacheFrameMarkerCount_;
|
++this.textureCacheFrameMarkerCount_;
|
||||||
|
|
||||||
goog.array.forEach(frameState.layersArray, function(layer) {
|
goog.array.forEach(frameState.layersArray, function(layer) {
|
||||||
|
|||||||
Reference in New Issue
Block a user