Remove unused pixelRatio code from CanvasProvider.

This commit is contained in:
Jürg Lehni 2014-03-17 16:41:11 +01:00
parent f3524ed0e2
commit 2b4ecfa669

View file

@ -15,20 +15,13 @@
var CanvasProvider = {
canvases: [],
getCanvas: function(width, height, pixelRatio) {
getCanvas: function(width, height) {
var canvas,
init = true;
if (typeof width === 'object') {
pixelRatio = height;
height = width.height;
width = width.width;
}
if (!pixelRatio) {
pixelRatio = 1;
} else if (pixelRatio !== 1) {
width *= pixelRatio;
height *= pixelRatio;
}
if (this.canvases.length) {
canvas = this.canvases.pop();
} else {
@ -52,8 +45,6 @@ var CanvasProvider = {
}
// We save on retrieval and restore on release.
ctx.save();
if (pixelRatio !== 1)
ctx.scale(pixelRatio, pixelRatio);
return canvas;
},