Merge pull request #1955 from ahocevar/canvas-no-taint
Test canvas size with an untainted canvas
This commit is contained in:
@@ -210,7 +210,7 @@ ol.renderer.canvas.TileLayer.prototype.prepareFrame =
|
||||
this.canvasSize_ = [canvasWidth, canvasHeight];
|
||||
this.context_ = context;
|
||||
this.canvasTooBig_ =
|
||||
!ol.renderer.canvas.Layer.testCanvasSize(context, this.canvasSize_);
|
||||
!ol.renderer.canvas.Layer.testCanvasSize(this.canvasSize_);
|
||||
} else {
|
||||
goog.asserts.assert(!goog.isNull(this.canvasSize_));
|
||||
goog.asserts.assert(!goog.isNull(this.context_));
|
||||
@@ -226,7 +226,7 @@ ol.renderer.canvas.TileLayer.prototype.prepareFrame =
|
||||
canvas.height = canvasHeight;
|
||||
this.canvasSize_ = [canvasWidth, canvasHeight];
|
||||
this.canvasTooBig_ =
|
||||
!ol.renderer.canvas.Layer.testCanvasSize(context, this.canvasSize_);
|
||||
!ol.renderer.canvas.Layer.testCanvasSize(this.canvasSize_);
|
||||
this.renderedCanvasTileRange_ = null;
|
||||
} else {
|
||||
canvasWidth = this.canvasSize_[0];
|
||||
|
||||
Reference in New Issue
Block a user