Bug 1513747 - Update webrender to commit 7f589fd3a57fcd4888cb39fc5f54da215aa99b19 (WR PR #3404). r=kats
authorWR Updater Bot <graphics-team@mozilla.staktrace.com>
Thu, 13 Dec 2018 01:15:39 +0000
changeset 450374 dae3203e4e7140dc59307b6b95bebdd7a0332494
parent 450345 cca0fa760d54c9509b8f5b1ca576c2ced63e8df1
child 450375 51ecf0c33c6b2db1a30a91a4e4310a3e774081a3
push id35200
push userbtara@mozilla.com
push dateThu, 13 Dec 2018 21:51:24 +0000
treeherdermozilla-central@563996e91860 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerskats
bugs1513747
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 1513747 - Update webrender to commit 7f589fd3a57fcd4888cb39fc5f54da215aa99b19 (WR PR #3404). r=kats https://github.com/servo/webrender/pull/3404 Differential Revision: https://phabricator.services.mozilla.com/D14359
gfx/webrender_bindings/revision.txt
gfx/wr/webrender/src/texture_allocator.rs
gfx/wr/webrender/src/tiling.rs
--- a/gfx/webrender_bindings/revision.txt
+++ b/gfx/webrender_bindings/revision.txt
@@ -1,1 +1,1 @@
-b5f190951f27dd04067489b9fbbeb87f55765f57
+7f589fd3a57fcd4888cb39fc5f54da215aa99b19
--- a/gfx/wr/webrender/src/texture_allocator.rs
+++ b/gfx/wr/webrender/src/texture_allocator.rs
@@ -30,17 +30,17 @@ impl FreeListBin {
             .enumerate()
             .rev()
             .find(|(_, &min_size)| min_size <= size.width && min_size <= size.height)
             .map(|(id, _)| FreeListBin(id as u8))
             .expect("Unable to find a bin!")
     }
 }
 
-#[derive(Debug, Clone, Copy)]
+#[derive(Debug, Clone, Copy, PartialEq)]
 #[cfg_attr(feature = "capture", derive(Serialize))]
 #[cfg_attr(feature = "replay", derive(Deserialize))]
 pub struct FreeRectSlice(pub u32);
 
 #[cfg_attr(feature = "capture", derive(Serialize))]
 #[cfg_attr(feature = "replay", derive(Deserialize))]
 pub struct FreeRect {
     slice: FreeRectSlice,
@@ -210,16 +210,23 @@ fn random_fill(count: usize, texture_siz
     use rand::{thread_rng, Rng};
 
     let total_rect = DeviceIntRect::new(
         DeviceIntPoint::zero(),
         DeviceIntSize::new(texture_size, texture_size),
     );
     let mut rng = thread_rng();
     let mut allocator = ArrayAllocationTracker::new();
+
+    // check for empty allocation
+    assert_eq!(
+        allocator.allocate(&DeviceIntSize::new(0, 12)),
+        Some((FreeRectSlice(0), DeviceIntPoint::zero())),
+    );
+
     let mut slices: Vec<Vec<DeviceIntRect>> = Vec::new();
     let mut requested_area = 0f32;
     // fill up the allocator
     for _ in 0 .. count {
         let size = DeviceIntSize::new(
             rng.gen_range(1, texture_size),
             rng.gen_range(1, texture_size),
         );
--- a/gfx/wr/webrender/src/tiling.rs
+++ b/gfx/wr/webrender/src/tiling.rs
@@ -238,16 +238,21 @@ impl<T: RenderTarget> RenderTargetList<T
                     allocator_dimensions,
                     alloc_size,
                 );
 
                 (slice, DeviceIntPoint::zero())
             }
         };
 
+        if alloc_size.is_empty_or_negative() && self.targets.is_empty() {
+            // push an unused target here, only if we don't have any
+            self.targets.push(T::new(self.screen_size));
+        }
+
         self.targets[free_rect_slice.0 as usize]
             .add_used(DeviceIntRect::new(origin, alloc_size));
 
         (RenderTargetIndex(free_rect_slice.0 as usize), origin)
     }
 
     pub fn needs_depth(&self) -> bool {
         self.targets.iter().any(|target| target.needs_depth())