Avoid clearing canvas twice
This commit is contained in:
committed by
Frederic Junod
parent
bd876831ed
commit
900bc176ae
@@ -95,15 +95,16 @@ ol.renderer.canvas.Map.prototype.renderFrame = function(frameState) {
|
||||
return;
|
||||
}
|
||||
|
||||
var context = this.context_;
|
||||
|
||||
var size = frameState.size;
|
||||
if (this.canvas_.width != size[0] || this.canvas_.height != size[1]) {
|
||||
this.canvas_.width = size[0];
|
||||
this.canvas_.height = size[1];
|
||||
} else {
|
||||
context.clearRect(0, 0, this.canvas_.width, this.canvas_.height);
|
||||
}
|
||||
|
||||
var context = this.context_;
|
||||
context.clearRect(0, 0, this.canvas_.width, this.canvas_.height);
|
||||
|
||||
this.calculateMatrices2D(frameState);
|
||||
|
||||
var layerStates = frameState.layerStates;
|
||||
|
||||
Reference in New Issue
Block a user