Bug 1505862 - Update webrender to commit e73e482d3c2e77c97502cacaf71128a30d30b12c (WR PR #3286). r=kats
authorWR Updater Bot <graphics-team@mozilla.staktrace.com>
Fri, 09 Nov 2018 02:57:01 +0000
changeset 445362 a85717115906b0d7803c3d6cf3d2950fdc865269
parent 445361 b4b2dcb8de263b9ac64f9619e6acf24bbd4ceb18
child 445363 c898249d585f090b16e75c66d710ea5aa5a0e64b
push id35015
push userdluca@mozilla.com
push dateFri, 09 Nov 2018 17:45:20 +0000
treeherdermozilla-central@2f1158e5e0ce [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerskats
bugs1505862
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 1505862 - Update webrender to commit e73e482d3c2e77c97502cacaf71128a30d30b12c (WR PR #3286). r=kats Differential Revision: https://phabricator.services.mozilla.com/D11421
gfx/webrender_api/src/display_list.rs
gfx/webrender_bindings/revision.txt
--- a/gfx/webrender_api/src/display_list.rs
+++ b/gfx/webrender_api/src/display_list.rs
@@ -4,18 +4,19 @@
 
 use bincode;
 use euclid::SideOffsets2D;
 #[cfg(feature = "deserialize")]
 use serde::de::Deserializer;
 #[cfg(feature = "serialize")]
 use serde::ser::{Serializer, SerializeSeq};
 use serde::{Deserialize, Serialize};
-use std::io::{Read, Write};
+use std::io::{Read, stdout, Write};
 use std::marker::PhantomData;
+use std::ops::Range;
 use std::{io, mem, ptr, slice};
 use time::precise_time_ns;
 use {AlphaType, BorderDetails, BorderDisplayItem, BorderRadius, BoxShadowClipMode};
 use {BoxShadowDisplayItem, ClipAndScrollInfo, ClipChainId, ClipChainItem, ClipDisplayItem, ClipId};
 use {ColorF, ComplexClipRegion, DisplayItem, ExtendMode, ExternalScrollId, FilterOp};
 use {FontInstanceKey, GlyphInstance, GlyphOptions, RasterSpace, Gradient, GradientBuilder};
 use {GradientDisplayItem, GradientStop, IframeDisplayItem, ImageDisplayItem, ImageKey, ImageMask};
 use {ImageRendering, LayoutPoint, LayoutPrimitiveInfo, LayoutRect, LayoutSideOffsets, LayoutSize};
@@ -919,39 +920,50 @@ impl DisplayListBuilder {
         self.next_clip_chain_id = state.next_clip_chain_id;
     }
 
     /// Discards the builder's save (indicating the attempted operation was successful).
     pub fn clear_save(&mut self) {
         self.save_state.take().expect("No save to clear in DisplayListBuilder");
     }
 
-    /// Print the display items in the list to stderr. If the start parameter
-    /// is specified, only display items starting at that index (inclusive) will
-    /// be printed. If the end parameter is specified, only display items before
-    /// that index (exclusive) will be printed. Calling this function with
-    /// end <= start is allowed but is just a waste of CPU cycles.
-    /// This function returns the total number of items in the display list, which
-    /// allows the caller to subsequently invoke this function to only dump the
-    /// newly-added items.
-    pub fn print_display_list(
+    /// Print the display items in the list to stdout.
+    pub fn print_display_list(&mut self) {
+        self.emit_display_list(0, Range { start: None, end: None }, stdout());
+    }
+
+    /// Emits a debug representation of display items in the list, for debugging
+    /// purposes. If the range's start parameter is specified, only display
+    /// items starting at that index (inclusive) will be printed. If the range's
+    /// end parameter is specified, only display items before that index
+    /// (exclusive) will be printed. Calling this function with end <= start is
+    /// allowed but is just a waste of CPU cycles. The function emits the
+    /// debug representation of the selected display items, one per line, with
+    /// the given indent, to the provided sink object. The return value is
+    /// the total number of items in the display list, which allows the
+    /// caller to subsequently invoke this function to only dump the newly-added
+    /// items.
+    pub fn emit_display_list<W>(
         &mut self,
         indent: usize,
-        start: Option<usize>,
-        end: Option<usize>,
-    ) -> usize {
+        range: Range<Option<usize>>,
+        mut sink: W,
+    ) -> usize
+    where
+        W: Write
+    {
         let mut temp = BuiltDisplayList::default();
         mem::swap(&mut temp.data, &mut self.data);
 
         let mut index: usize = 0;
         {
             let mut iter = BuiltDisplayListIter::new(&temp);
             while let Some(item) = iter.next_raw() {
-                if index >= start.unwrap_or(0) && end.map_or(true, |e| index < e) {
-                    eprintln!("{}{:?}", "  ".repeat(indent), item.display_item());
+                if index >= range.start.unwrap_or(0) && range.end.map_or(true, |e| index < e) {
+                    writeln!(sink, "{}{:?}", "  ".repeat(indent), item.display_item());
                 }
                 index += 1;
             }
         }
 
         self.data = temp.data;
         index
     }
--- a/gfx/webrender_bindings/revision.txt
+++ b/gfx/webrender_bindings/revision.txt
@@ -1,1 +1,1 @@
-b8829189cfc1769550c9ab4a4bb994e28621f009
+e73e482d3c2e77c97502cacaf71128a30d30b12c