diff --git a/src/ui/CanvasView.js b/src/ui/CanvasView.js index db4d9dc4..2f458eec 100644 --- a/src/ui/CanvasView.js +++ b/src/ui/CanvasView.js @@ -50,8 +50,6 @@ var CanvasView = View.extend(/** @lends CanvasView# */{ draw: function(checkRedraw) { if (checkRedraw && !this._redrawNeeded) return false; - if (this._stats) - this._stats.update(); // Initial tests conclude that clearing the canvas using clearRect // is always faster than setting canvas.width = canvas.width // http://jsperf.com/clearrect-vs-setting-width/7 diff --git a/src/ui/View.js b/src/ui/View.js index f3fe2af9..59ff5280 100644 --- a/src/ui/View.js +++ b/src/ui/View.js @@ -58,6 +58,9 @@ var View = this.View = Base.extend(Callback, /** @lends View# */{ count: count++ })); before = now; + // Update framerate stats + if (that._stats) + that._stats.update(); // Automatically draw view on each frame. that.draw(true); };