Merge pull request #1955 from ahocevar/canvas-no-taint

Test canvas size with an untainted canvas
This commit is contained in:
Andreas Hocevar
2014-04-07 13:52:09 +02:00
2 changed files with 25 additions and 15 deletions

View File

@@ -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];