Bug 1591758 - Fix dirty rects for OS compositors without partial updates. r=nical
authorGlenn Watson <git@intuitionlibrary.com>
Tue, 05 Nov 2019 08:43:10 +0000
changeset 500569 95dfa337c1dbb77e210abc30790ccb49ff7e163b
parent 500568 36406d4fb1a676b071b5147d8048ecc4f8a72022
child 500570 4ad4fe8c0b482404e853f4206e46e42303d5830f
push id114166
push userapavel@mozilla.com
push dateThu, 07 Nov 2019 10:04:01 +0000
treeherdermozilla-inbound@d271c572a9bc [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersnical
bugs1591758
milestone72.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 1591758 - Fix dirty rects for OS compositors without partial updates. r=nical Differential Revision: https://phabricator.services.mozilla.com/D51773
gfx/wr/webrender/src/picture.rs
--- a/gfx/wr/webrender/src/picture.rs
+++ b/gfx/wr/webrender/src/picture.rs
@@ -823,16 +823,23 @@ impl Tile {
                 self.root.maybe_merge_or_split(
                     0,
                     &self.current_descriptor.prims,
                     max_split_level,
                 );
             }
         }
 
+        // The dirty rect will be set correctly by now. If the underlying platform
+        // doesn't support partial updates, and this tile isn't valid, force the dirty
+        // rect to be the size of the entire tile.
+        if !self.is_valid && !supports_dirty_rects {
+            self.dirty_rect = self.rect;
+        }
+
         // See if this tile is a simple color, in which case we can just draw
         // it as a rect, and avoid allocating a texture surface and drawing it.
         // TODO(gw): Initial native compositor interface doesn't support simple
         //           color tiles. We can definitely support this in DC, so this
         //           should be added as a follow up.
         let is_simple_prim =
             ctx.backdrop.kind.can_be_promoted_to_compositor_surface() &&
             self.current_descriptor.prims.len() == 1 &&