Bug 1511242 - Update webrender to commit d960500dfd4b55c21ae7ce6f02574f672cd015e0 (WR PR #3370). r=kats
authorWR Updater Bot <graphics-team@mozilla.staktrace.com>
Sat, 01 Dec 2018 01:35:26 +0000
changeset 505501 9760debec7eccf93dec170f9bed81a0ac3cacbc2
parent 505500 d97acd2c8af79d263ec6f11abd7a14b032f8e179
child 505502 5a212090eeecc702a8c3461e6926d9c83abb7c09
push id10290
push userffxbld-merge
push dateMon, 03 Dec 2018 16:23:23 +0000
treeherdermozilla-beta@700bed2445e6 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerskats
bugs1511242
milestone65.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 1511242 - Update webrender to commit d960500dfd4b55c21ae7ce6f02574f672cd015e0 (WR PR #3370). r=kats https://github.com/servo/webrender/pull/3370 Differential Revision: https://phabricator.services.mozilla.com/D13553
gfx/webrender_bindings/revision.txt
gfx/wr/webrender/src/render_backend.rs
gfx/wr/webrender/src/texture_cache.rs
--- a/gfx/webrender_bindings/revision.txt
+++ b/gfx/webrender_bindings/revision.txt
@@ -1,1 +1,1 @@
-d771bae9f824769c73419fdc3ccffa2bdc47c3e4
+d960500dfd4b55c21ae7ce6f02574f672cd015e0
--- a/gfx/wr/webrender/src/render_backend.rs
+++ b/gfx/wr/webrender/src/render_backend.rs
@@ -405,16 +405,19 @@ impl Document {
         &mut self,
         resource_cache: &mut ResourceCache,
         gpu_cache: &mut GpuCache,
         resource_profile: &mut ResourceProfileCounters,
     ) -> RenderedDocument {
         let accumulated_scale_factor = self.view.accumulated_scale_factor();
         let pan = self.view.pan.to_f32() / accumulated_scale_factor;
 
+        // Advance to the next frame.
+        self.stamp.advance();
+
         assert!(self.stamp.frame_id() != FrameId::INVALID,
                 "First frame increment must happen before build_frame()");
 
         let frame = {
             let frame_builder = self.frame_builder.as_mut().unwrap();
             let frame = frame_builder.build(
                 resource_cache,
                 gpu_cache,
@@ -527,19 +530,16 @@ impl Document {
 
         self.frame_builder = Some(built_scene.frame_builder);
 
         self.scratch.recycle();
 
         let old_scrolling_states = self.clip_scroll_tree.drain();
         self.clip_scroll_tree = built_scene.clip_scroll_tree;
         self.clip_scroll_tree.finalize_and_apply_pending_scroll_offsets(old_scrolling_states);
-
-        // Advance to the next frame.
-        self.stamp.advance();
     }
 }
 
 struct DocumentOps {
     scroll: bool,
 }
 
 impl DocumentOps {
--- a/gfx/wr/webrender/src/texture_cache.rs
+++ b/gfx/wr/webrender/src/texture_cache.rs
@@ -817,29 +817,29 @@ impl TextureCache {
             entry.eviction = Eviction::Auto;
         }
     }
 
     /// Returns the default eviction policy.
     ///
     /// These parameters come from very rough instrumentation of hits in the
     /// shared cache, with simple browsing on a few pages. In rough terms, more
-    /// than 95% of cache hits occur for entries that were used in the previous
-    /// frame, and 99% occur within two frames. If we exclude immediately-reused
-    /// (first frame) entries, 90% of the remaining hits happen within the first
-    /// 30 frames. So we can be relatively agressive about eviction without
-    /// sacrificing much in terms of cache performance.
-    ///
+    /// than 99.5% of cache hits occur for entries that were used in the previous
+    /// frame. This is obviously the dominant case, but we still want good behavior
+    /// in long-tail cases (i.e. a large image is scrolled off-screen and on again).
+    /// If we exclude immediately-reused (first frame) entries, 70% of the remaining
+    /// hits happen within the first 200 frames. So we can be relatively agressive
+    /// about eviction without sacrificing much in terms of cache performance.
     /// The one wrinkle is that animation-heavy pages do tend to extend the
     /// distribution, presumably because they churn through FrameIds faster than
     /// their more-static counterparts. As such, we _also_ provide a time floor
     /// (which was not measured with the same degree of rigour).
     fn default_eviction(&self) -> EvictionThreshold {
         EvictionThresholdBuilder::new(self.now)
-            .max_frames(30)
+            .max_frames(200)
             .max_time_s(3)
             .scale_by_pressure()
             .build()
     }
 
     /// Shared eviction code for standalone and shared entries.
     ///
     /// See `EvictionThreshold` for more details on policy.