Merge pull request #5015 from Snuffleupagus/zero-WebGL-canvases

Zero the height and width of the WebGL canvases on cleanup
This commit is contained in:
Tim van der Meij 2014-07-16 17:07:18 +02:00
commit a7800c276b

View File

@ -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;
}