B2G/gecko/toolkit/content/tests/fennec-tile-testapp/chrome/content/TileManager.js
/**
   * This will mark dirty at least everything in dirtyRect (which must be
   * specified in canvas coordinates).  If dirtyRect is not given then
   * the entire tile is marked dirty.
   */
This will mark dirty at least everything in dirtyRect (which must be
specified in canvas coordinates).  If dirtyRect is not given then
the entire tile is marked dirty.
This will mark dirty at least everything in dirtyRect ( which must be specified in canvas coordinates ) . If dirtyRect is not given then the entire tile is marked dirty .
function updateDirtyRegion(dirtyRect) {
    if (!dirtyRect) {
      if (!this._dirtyTileCanvasRect)
        this._dirtyTileCanvasRect = this.boundRect.clone();
      else
        this._dirtyTileCanvasRect.copyFrom(this.boundRect);
    } else {
      if (!this._dirtyTileCanvasRect)
        this._dirtyTileCanvasRect = dirtyRect.intersect(this.boundRect);
      else if (dirtyRect.intersects(this.boundRect))
        this._dirtyTileCanvasRect.expandToContain(dirtyRect.intersect(this.boundRect));
    }
    if (this._dirtyTileCanvasRect)
      this._dirtyTileCanvas = true;
  }
function updateDirtyRegion ( dirtyRect ) { if ( ! dirtyRect ) { if ( ! this . _dirtyTileCanvasRect ) this . _dirtyTileCanvasRect = this . boundRect . clone ( ) ; else this . _dirtyTileCanvasRect . copyFrom ( this . boundRect ) ; } else { if ( ! this . _dirtyTileCanvasRect ) this . _dirtyTileCanvasRect = dirtyRect . intersect ( this . boundRect ) ; else if ( dirtyRect . intersects ( this . boundRect ) ) this . _dirtyTileCanvasRect . expandToContain ( dirtyRect . intersect ( this . boundRect ) ) ; } if ( this . _dirtyTileCanvasRect ) this . _dirtyTileCanvas = true ; }
This will mark dirty at least everything in dirtyRect (which must be
 specified in canvas coordinates).
This will mark dirty at least everything in dirtyRect ( which must be specified in canvas coordinates ) .
// TODO if after the above, the dirty rectangle is large enough, // mark the whole tile dirty.