Bug 1502156 - Update webrender to commit 20214bf371002786cfd8daabf58c815bf1ee84a3. r=kats
authorWR Updater Bot <graphics-team@mozilla.staktrace.com>
Fri, 26 Oct 2018 13:05:51 +0000
changeset 443130 e02bbef03c88272b754768d0f7a0c2252e5c93e2
parent 443129 f106b1dc2db1c29df92e5f653c4de2b9d96e63d5
child 443131 4ee89e659d382b1052dca58c955dd675c9f2a80f
push id71809
push userkgupta@mozilla.com
push dateFri, 26 Oct 2018 13:06:26 +0000
treeherderautoland@e02bbef03c88 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerskats
bugs1502156
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 1502156 - Update webrender to commit 20214bf371002786cfd8daabf58c815bf1ee84a3. r=kats Differential Revision: https://phabricator.services.mozilla.com/D9907
gfx/webrender/src/batch.rs
gfx/webrender/src/prim_store.rs
gfx/webrender/src/render_task.rs
gfx/webrender_bindings/revision.txt
--- a/gfx/webrender/src/batch.rs
+++ b/gfx/webrender/src/batch.rs
@@ -1289,17 +1289,18 @@ impl AlphaBatchBuilder {
         match (&brush.segment_desc, &params.segment_data) {
             (Some(ref segment_desc), SegmentDataKind::Instanced(ref segment_data)) => {
                 // In this case, we have both a list of segments, and a list of
                 // per-segment instance data. Zip them together to build batches.
                 debug_assert_eq!(segment_desc.segments.len(), segment_data.len());
                 for (segment_index, (segment, segment_data)) in segment_desc.segments
                     .iter()
                     .zip(segment_data.iter())
-                    .enumerate() {
+                    .enumerate()
+                {
                     self.add_segment_to_batch(
                         segment,
                         segment_data,
                         segment_index as i32,
                         params.batch_kind,
                         prim_instance,
                         prim_header_index,
                         alpha_blend_mode,
@@ -1310,17 +1311,18 @@ impl AlphaBatchBuilder {
                     );
                 }
             }
             (Some(ref segment_desc), SegmentDataKind::Shared(ref segment_data)) => {
                 // A list of segments, but the per-segment data is common
                 // between all segments.
                 for (segment_index, segment) in segment_desc.segments
                     .iter()
-                    .enumerate() {
+                    .enumerate()
+                {
                     self.add_segment_to_batch(
                         segment,
                         segment_data,
                         segment_index as i32,
                         params.batch_kind,
                         prim_instance,
                         prim_header_index,
                         alpha_blend_mode,
@@ -1328,16 +1330,17 @@ impl AlphaBatchBuilder {
                         transform_kind,
                         render_tasks,
                         z_id,
                     );
                 }
             }
             (None, SegmentDataKind::Shared(ref segment_data)) => {
                 // No segments, and thus no per-segment instance data.
+                // Note: the blend mode already takes opacity into account
                 let batch_key = BatchKey {
                     blend_mode: non_segmented_blend_mode,
                     kind: BatchKind::Brush(params.batch_kind),
                     textures: segment_data.textures,
                 };
                 let instance = PrimitiveInstanceData::from(BrushInstance {
                     segment_index: 0,
                     edge_flags: EdgeAaSegmentMask::all(),
--- a/gfx/webrender/src/prim_store.rs
+++ b/gfx/webrender/src/prim_store.rs
@@ -1927,17 +1927,18 @@ impl PrimitiveStore {
             &prim.details,
             frame_state.resource_cache,
         );
 
         if is_passthrough {
             prim_instance.clipped_world_rect = Some(pic_state.map_pic_to_world.bounds);
         } else {
             if prim.local_rect.size.width <= 0.0 ||
-               prim.local_rect.size.height <= 0.0 {
+               prim.local_rect.size.height <= 0.0
+            {
                 if cfg!(debug_assertions) && is_chased {
                     println!("\tculled for zero local rectangle");
                 }
                 return false;
             }
 
             // Inflate the local rect for this primitive by the inflation factor of
             // the picture context. This ensures that even if the primitive itself
@@ -1974,16 +1975,19 @@ impl PrimitiveStore {
                     &frame_context.world_rect,
                     &clip_node_collector,
                     &mut frame_state.resources.clip_data_store,
                 );
 
             let clip_chain = match clip_chain {
                 Some(clip_chain) => clip_chain,
                 None => {
+                    if cfg!(debug_assertions) && is_chased {
+                        println!("\tunable to build the clip chain, skipping");
+                    }
                     prim_instance.clipped_world_rect = None;
                     return false;
                 }
             };
 
             if cfg!(debug_assertions) && is_chased {
                 println!("\teffective clip chain from {:?} {}",
                     clip_chain.clips_range,
@@ -2080,18 +2084,18 @@ impl PrimitiveStore {
             .display_list;
 
         for (plane_split_anchor, prim_instance) in prim_instances.iter_mut().enumerate() {
             prim_instance.clipped_world_rect = None;
 
             let prim_index = prim_instance.prim_index;
             let is_chased = Some(prim_index) == self.chase_id;
 
-            if is_chased {
-                println!("\tpreparing prim {:?} in pipeline {:?}",
+            if cfg!(debug_assertions) && is_chased {
+                println!("\tpreparing {:?} in {:?}",
                     prim_instance.prim_index, pic_context.pipeline_id);
             }
 
             // Do some basic checks first, that can early out
             // without even knowing the local rect.
             if !frame_state
                 .resources
                 .prim_data_store[prim_instance.prim_data_handle]
@@ -2804,26 +2808,38 @@ impl PrimitiveInstance {
                             } else if request_source_image {
                                 frame_state.resource_cache.request_image(
                                     request,
                                     frame_state.gpu_cache,
                                 );
                             }
                         }
                     }
-                    BrushKind::LineDecoration { ref mut handle, style, orientation, wavy_line_thickness, .. } => {
+                    BrushKind::LineDecoration { color, ref mut handle, style, orientation, wavy_line_thickness } => {
+                        // Update opacity for this primitive to ensure the correct
+                        // batching parameters are used.
+                        self.opacity.is_opaque = match style {
+                            LineStyle::Solid => color.a == 1.0,
+                            LineStyle::Dotted |
+                            LineStyle::Dashed |
+                            LineStyle::Wavy => false,
+                        };
+
                         // Work out the device pixel size to be used to cache this line decoration.
-
                         let size = get_line_decoration_sizes(
                             &prim_local_rect.size,
                             orientation,
                             style,
                             wavy_line_thickness,
                         );
 
+                        if is_chased {
+                            println!("\tline decoration opaque={}, sizes={:?}", self.opacity.is_opaque, size);
+                        }
+
                         if let Some((inline_size, block_size)) = size {
                             let size = match orientation {
                                 LineOrientation::Horizontal => LayoutSize::new(inline_size, block_size),
                                 LineOrientation::Vertical => LayoutSize::new(block_size, inline_size),
                             };
 
                             // If dotted, adjust the clip rect to ensure we don't draw a final
                             // partial dot.
--- a/gfx/webrender/src/render_task.rs
+++ b/gfx/webrender/src/render_task.rs
@@ -47,17 +47,17 @@ fn render_task_sanity_check(size: &Devic
     }
 }
 
 #[derive(Copy, Clone, PartialEq, Eq, Hash, Debug)]
 #[cfg_attr(feature = "capture", derive(Serialize))]
 #[cfg_attr(feature = "replay", derive(Deserialize))]
 pub struct RenderTaskId(pub u32, FrameId); // TODO(gw): Make private when using GPU cache!
 
-#[derive(Debug, Copy, Clone)]
+#[derive(Debug, Copy, Clone, PartialEq)]
 #[repr(C)]
 #[cfg_attr(feature = "capture", derive(Serialize))]
 #[cfg_attr(feature = "replay", derive(Deserialize))]
 pub struct RenderTaskAddress(pub u32);
 
 #[derive(Debug)]
 #[cfg_attr(feature = "capture", derive(Serialize))]
 #[cfg_attr(feature = "replay", derive(Deserialize))]
--- a/gfx/webrender_bindings/revision.txt
+++ b/gfx/webrender_bindings/revision.txt
@@ -1,1 +1,1 @@
-925dd051a36f1c1cd02e7f635f7e439ab2804f15
+20214bf371002786cfd8daabf58c815bf1ee84a3