avoid apply transform twice for composite context

This commit is contained in:
Xiliang Chen 2016-01-21 14:25:39 +13:00
parent 1eea0db897
commit 069f4b9bdf

View File

@ -856,7 +856,10 @@ var CanvasGraphics = (function CanvasGraphicsClosure() {
if (this.transparentCanvas) {
this.ctx = this.compositeCtx;
this.ctx.save();
this.ctx.setTransform(1, 0, 0, 1, 0, 0); // Avoid apply transform twice
this.ctx.drawImage(this.transparentCanvas, 0, 0);
this.ctx.restore();
this.transparentCanvas = null;
}