code: function(width, height) {
      if (width === this._width && height === this._height) {
        return;
      }
      this._resize = true;
      this._width = width;
      this._height = height;
    }
docs: tells the canvas to resize. The resize does not happen immediately but is delayed until the next redraw. This avoids flickering