Bug 542607 - No checkerboarding for pages with animation [r=mark.finkle r=vingtetun]
authorBenjamin Stover <webapps@stechz.com>
Thu, 18 Feb 2010 20:58:24 -0500
changeset 66021 72ae7c7bb8e1a751beae243fdbc52ec106463f7e
parent 66020 ba971399bf668314e0f3a806f82e0ab7c96df15f
child 66022 8008a66f382435f633e1df52630f67d01fb32a89
push id1
push userroot
push dateTue, 26 Apr 2011 22:38:44 +0000
treeherdermozilla-beta@bfdb6e623a36 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersmark, vingtetun
bugs542607
Bug 542607 - No checkerboarding for pages with animation [r=mark.finkle r=vingtetun]
mobile/chrome/content/BrowserView.js
mobile/chrome/content/TileManager.js.in
--- a/mobile/chrome/content/BrowserView.js
+++ b/mobile/chrome/content/BrowserView.js
@@ -512,17 +512,17 @@ BrowserView.prototype = {
       if (r.right < 0 || r.bottom < 0)
         continue;
 
       r.restrictTo(vs.viewportRect);
       if (!r.isEmpty())
         rects.push(r);
     }
 
-    tm.dirtyRects(rects, this.isRendering());
+    tm.dirtyRects(rects, this.isRendering(), true);
   },
 
   /** If browser scrolls, pan content to new scroll area. */
   handlePageScroll: function handlePageScroll(aEvent) {
     if (aEvent.target != this._browser.contentDocument || this._ignorePageScroll)
       return;
     // XXX shouldn't really make calls to Browser
     Browser.scrollContentToBrowser();
--- a/mobile/chrome/content/TileManager.js.in
+++ b/mobile/chrome/content/TileManager.js.in
@@ -263,31 +263,32 @@ TileManager.prototype = {
       tile.clear(rect);
       END_FOREACH_IN_RECT
     }
 
     if (criticalIsDirty && doCriticalRender)
       this.criticalRectPaint();
   },
 
-  dirtyRects: function dirtyRects(rects, doCriticalRender) {
+  dirtyRects: function dirtyRects(rects, doCriticalRender, keepTileInDom) {
     let outsideIsDirty = false;
     let criticalIsDirty = false;
     let criticalRect = this._criticalRect;
     let tc = this._tileCache;
     let crawler = this._crawler;
 
     for (let i = 0, len = rects.length; i < len; ++i) {
       let rect = rects[i];
 
       BEGIN_FOREACH_IN_RECT(rect, tc, tile)
 
       if (!tile.boundRect.intersects(criticalRect)) {
         // Dirty tile outside of viewport. Just remove and redraw later.
-        this._removeTileSafe(tile);
+        if (!keepTileInDom)
+          this._removeTileSafe(tile);
         crawler.enqueue(tile.i, tile.j);
         outsideIsDirty = true;
       } else {
         criticalIsDirty = true;
       }
 
       tile.markDirty(rects[i]);