[Pkg-javascript-commits] [pdf.js] 153/207: Zero the height and width of the WebGL canvases on cleanup

David Prévot taffit at moszumanska.debian.org
Mon Jul 28 15:36:42 UTC 2014


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

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

commit 8ad1ea3c5f6b9926e968f10148c2845f97bee68e
Author: Jonas Jenwald <jonas.jenwald at gmail.com>
Date:   Wed Jun 18 01:14:40 2014 +0200

    Zero the height and width of the WebGL canvases on cleanup
---
 src/display/webgl.js | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/src/display/webgl.js b/src/display/webgl.js
index cfef4c8..76dd0f6 100644
--- a/src/display/webgl.js
+++ b/src/display/webgl.js
@@ -406,6 +406,14 @@ var WebGLUtils = (function WebGLUtilsClosure() {
   }
 
   function cleanup() {
+    if (smaskCache && smaskCache.canvas) {
+      smaskCache.canvas.width = 0;
+      smaskCache.canvas.height = 0;
+    }
+    if (figuresCache && figuresCache.canvas) {
+      figuresCache.canvas.width = 0;
+      figuresCache.canvas.height = 0;
+    }
     smaskCache = null;
     figuresCache = 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