From d0c2c5dd1d067c832c7fcd1883f737132956adc3 Mon Sep 17 00:00:00 2001 From: Jonathan Puckey Date: Mon, 21 Feb 2011 03:52:28 +0100 Subject: [PATCH] Add todo about speeding up canvas clearing. --- src/document/Doc.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/document/Doc.js b/src/document/Doc.js index e78e04f9..8b5136da 100644 --- a/src/document/Doc.js +++ b/src/document/Doc.js @@ -29,6 +29,8 @@ Doc = Base.extend({ redraw: function() { if (this.canvas) { + // TODO: clearing the canvas by setting + // this.canvas.width = this.canvas.width might be faster.. this.ctx.clearRect(0, 0, this.size.width + 1, this.size.height); for (var i = 0, l = this.layers.length; i < l; i++) { this.layers[i].draw(this.ctx);