Bug 1595014 - Make dirty rects are invalid when old tiles were dropped r=gw
authorsotaro <sotaro.ikeda.g@gmail.com>
Wed, 12 Feb 2020 05:27:12 +0000
changeset 513483 8e08016b3d0acf0c5c3116b087d5455df573d99c
parent 513482 b174d2f9072d36738d5dc484526d51a3a4f2ef82
child 513484 c8024f8147e6fb09f78dfe15142676e6a2172507
push id37116
push userrmaries@mozilla.com
push dateWed, 12 Feb 2020 20:57:45 +0000
treeherdermozilla-central@e84a0546e6e2 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersgw
bugs1595014
milestone75.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1595014 - Make dirty rects are invalid when old tiles were dropped r=gw composite_simple() calculates combined dirty rect from all tile's dirty rect. But the combined dirty rect becomes invalid when there is an old tile that was dropped. The dropped tile's dirty rect is not counted in composite_simple(). Differential Revision: https://phabricator.services.mozilla.com/D62531
gfx/wr/webrender/src/picture.rs
--- a/gfx/wr/webrender/src/picture.rs
+++ b/gfx/wr/webrender/src/picture.rs
@@ -2423,16 +2423,21 @@ impl TileCacheInstance {
                 if tile.is_visible {
                     world_culling_rect = world_culling_rect.union(&tile.world_tile_rect);
                 }
 
                 self.tiles.insert(key, tile);
             }
         }
 
+        // When old tiles that remain after the loop, dirty rects are not valid.
+        if !self.old_tiles.is_empty() {
+            frame_state.composite_state.dirty_rects_are_valid = false;
+        }
+
         // Any old tiles that remain after the loop above are going to be dropped. For
         // simple composite mode, the texture cache handle will expire and be collected
         // by the texture cache. For native compositor mode, we need to explicitly
         // invoke a callback to the client to destroy that surface.
         frame_state.composite_state.destroy_native_tiles(
             self.old_tiles.values_mut(),
             frame_state.resource_cache,
         );