[Pkg-javascript-commits] [pdf.js] 145/414: avoid apply transform twice for composite context

David Prévot taffit at moszumanska.debian.org
Tue Jun 28 17:12:15 UTC 2016


This is an automated email from the git hooks/post-receive script.

taffit pushed a commit to branch master
in repository pdf.js.

commit 069f4b9bdf8a43a336f1650c5806ec41c3154f2e
Author: Xiliang Chen <xlchen1291 at gmail.com>
Date:   Thu Jan 21 14:25:39 2016 +1300

    avoid apply transform twice for composite context
---
 src/display/canvas.js | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/src/display/canvas.js b/src/display/canvas.js
index 2e8c766..6355d73 100644
--- a/src/display/canvas.js
+++ b/src/display/canvas.js
@@ -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;
       }
 

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-javascript/pdf.js.git



More information about the Pkg-javascript-commits mailing list