Bug 1517038 - Update webrender to commit a970cbaa88a7516758046c8be016c34627d31355 (WR PR #3456). r=kats
authorWR Updater Bot <graphics-team@mozilla.staktrace.com>
Tue, 01 Jan 2019 00:40:07 +0000
changeset 509328 da77d34af70103094ca2fad7d7d9bf60b314cd73
parent 509327 605aa74c29e369941cbf83c23492322c1256915c
child 509336 34970df803855000ad8ad935765ba1b4ea9f9050
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
bugs1517038
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 1517038 - Update webrender to commit a970cbaa88a7516758046c8be016c34627d31355 (WR PR #3456). r=kats https://github.com/servo/webrender/pull/3456 Differential Revision: https://phabricator.services.mozilla.com/D15550
gfx/webrender_bindings/revision.txt
gfx/wr/webrender/src/renderer.rs
--- a/gfx/webrender_bindings/revision.txt
+++ b/gfx/webrender_bindings/revision.txt
@@ -1,1 +1,1 @@
-ff485fa67cc7341b8e7a0d32e377a419e8d252c6
+a970cbaa88a7516758046c8be016c34627d31355
--- a/gfx/wr/webrender/src/renderer.rs
+++ b/gfx/wr/webrender/src/renderer.rs
@@ -1358,28 +1358,37 @@ impl VertexDataTexture {
         }
 
         let width =
             (MAX_VERTEX_TEXTURE_WIDTH - (MAX_VERTEX_TEXTURE_WIDTH % texels_per_item)) as i32;
         let needed_height = (data.len() / items_per_row) as i32;
         let existing_height = self.texture.as_ref().map_or(0, |t| t.get_dimensions().height);
 
         // Create a new texture if needed.
-        if needed_height > existing_height {
+        //
+        // These textures are generally very small, which is why we don't bother
+        // with incremental updates and just re-upload every frame. For most pages
+        // they're one row each, and on stress tests like css-francine they end up
+        // in the 6-14 range. So we size the texture tightly to what we need (usually
+        // 1), and shrink it if the waste would be more than 10 rows. This helps
+        // with memory overhead, especially because there are several instances of
+        // these textures per Renderer.
+        if needed_height > existing_height || needed_height + 10 < existing_height {
             // Drop the existing texture, if any.
             if let Some(t) = self.texture.take() {
                 device.delete_texture(t);
             }
-            let new_height = (needed_height + 127) & !127;
 
             let texture = device.create_texture(
                 TextureTarget::Default,
                 self.format,
                 width,
-                new_height,
+                // Ensure height is at least two to work around
+                // https://bugs.chromium.org/p/angleproject/issues/detail?id=3039
+                needed_height.max(2),
                 TextureFilter::Nearest,
                 None,
                 1,
             );
             self.texture = Some(texture);
         }
 
         let rect = DeviceIntRect::new(