mirror of
https://github.com/scratchfoundation/paper.js.git
synced 2025-01-19 06:00:56 -05:00
Remove unused pixelRatio code from CanvasProvider.
This commit is contained in:
parent
f3524ed0e2
commit
2b4ecfa669
1 changed files with 1 additions and 10 deletions
|
@ -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;
|
||||
},
|
||||
|
||||
|
|
Loading…
Reference in a new issue