Bug 1516810 - Update webrender to commit ff485fa67cc7341b8e7a0d32e377a419e8d252c6 (WR PR #3454). r=kats
authorWR Updater Bot <graphics-team@mozilla.staktrace.com>
Mon, 31 Dec 2018 19:16:49 +0000
changeset 509325 1a2501b02a56344234a72e519c2a1ede2cb217c9
parent 509324 807f9818930a9992834f1770bd2fa10147019c81
child 509326 2f42b03f9e8fc93439c11c6d65a066325b1c3796
push id10547
push userffxbld-merge
push dateMon, 21 Jan 2019 13:03:58 +0000
treeherdermozilla-beta@24ec1916bffe [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerskats
bugs1516810
milestone66.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 1516810 - Update webrender to commit ff485fa67cc7341b8e7a0d32e377a419e8d252c6 (WR PR #3454). r=kats https://github.com/servo/webrender/pull/3454 Differential Revision: https://phabricator.services.mozilla.com/D15532
gfx/webrender_bindings/revision.txt
gfx/wr/webrender/src/display_list_flattener.rs
--- a/gfx/webrender_bindings/revision.txt
+++ b/gfx/webrender_bindings/revision.txt
@@ -1,1 +1,1 @@
-8b8ca774f555aeb8ef99743196593a192298dd60
+ff485fa67cc7341b8e7a0d32e377a419e8d252c6
--- a/gfx/wr/webrender/src/display_list_flattener.rs
+++ b/gfx/wr/webrender/src/display_list_flattener.rs
@@ -258,31 +258,46 @@ impl<'a> DisplayListFlattener<'a> {
         //  [trailing root primitives]
         //
         // This step is typically very quick, because there are only
         // a small number of items in the root stacking context, since
         // most of the content is embedded in its own picture.
         //
 
         // Find the first primitive which has the desired scroll root.
+        let mut first_index = None;
         let mut main_scroll_root = None;
 
-        let first_index = primitives.iter().position(|instance| {
+        for (i, instance) in primitives.iter().enumerate() {
             let scroll_root = self.find_scroll_root(
                 instance.spatial_node_index,
             );
 
-            if scroll_root == ROOT_SPATIAL_NODE_INDEX {
-                false
-            } else {
-                debug_assert!(main_scroll_root.is_none());
-                main_scroll_root = Some(scroll_root);
-                true
+            if scroll_root != ROOT_SPATIAL_NODE_INDEX {
+                // If we find multiple scroll roots in this page, then skip
+                // picture caching for now. In future, we can handle picture
+                // caching on these sites by creating a tile cache per
+                // scroll root, or (more likely) selecting the common parent
+                // scroll root between the detected scroll roots.
+                match main_scroll_root {
+                    Some(main_scroll_root) => {
+                        if main_scroll_root != scroll_root {
+                            return;
+                        }
+                    }
+                    None => {
+                        main_scroll_root = Some(scroll_root);
+                    }
+                }
+
+                if first_index.is_none() {
+                    first_index = Some(i);
+                }
             }
-        });
+        }
 
         let main_scroll_root = match main_scroll_root {
             Some(main_scroll_root) => main_scroll_root,
             None => ROOT_SPATIAL_NODE_INDEX,
         };
 
         // Get the list of existing primitives in the main stacking context.
         let mut old_prim_list = mem::replace(