| author | Narcis Beleuzu <nbeleuzu@mozilla.com> |
| Fri, 20 Dec 2019 20:53:21 +0200 | |
| changeset 508057 | e94a014eb27e172be7f6b3860806803159d3d1f2 |
| parent 508056 | 43f26061743cb8f64c3a853b7770892615b5dfb5 |
| child 508058 | 1759c1b2fa6b663a475d23450148ac4a351704dc |
| child 508059 | 0309a3ff69a0351a485808c0fcd484bbd93547e4 |
| push id | 36936 |
| push user | cbrindusan@mozilla.com |
| push date | Fri, 20 Dec 2019 21:54:48 +0000 |
| treeherder | mozilla-central@e94a014eb27e [default view] [failures only] |
| perfherder | [talos] [build metrics] [platform microbench] (compared to previous push) |
| bugs | 1605380 |
| milestone | 73.0a1 |
| backs out | c9cbe7b9ad94d9b1e488bc4e650b053d3e06a646 |
| first release with | nightly linux32
e94a014eb27e
/
73.0a1
/
20191220215448
/
files
nightly linux64
e94a014eb27e
/
73.0a1
/
20191220215448
/
files
nightly mac
e94a014eb27e
/
73.0a1
/
20191220215448
/
files
nightly win32
e94a014eb27e
/
73.0a1
/
20191220215448
/
files
nightly win64
e94a014eb27e
/
73.0a1
/
20191220215448
/
files
|
| last release without | nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
|
| releases | nightly linux32
73.0a1
/
20191220215448
/
pushlog to previous
nightly linux64
73.0a1
/
20191220215448
/
pushlog to previous
nightly mac
73.0a1
/
20191220215448
/
pushlog to previous
nightly win32
73.0a1
/
20191220215448
/
pushlog to previous
nightly win64
73.0a1
/
20191220215448
/
pushlog to previous
|
--- a/gfx/wr/webrender/src/scene_building.rs +++ b/gfx/wr/webrender/src/scene_building.rs @@ -989,64 +989,59 @@ impl<'a> SceneBuilder<'a> { ClipChainId::INVALID }, ) } fn process_common_properties( &mut self, common: &CommonItemProperties, - bounds: Option<&LayoutRect>, - apply_pipeline_clip: bool, + apply_pipeline_clip: bool + ) -> (LayoutPrimitiveInfo, ScrollNodeAndClipChain) { + let (layout, _, clip_and_scroll) = self.process_common_properties_with_bounds( + common, + &common.clip_rect, + apply_pipeline_clip, + ); + (layout, clip_and_scroll) + } + + fn process_common_properties_with_bounds( + &mut self, + common: &CommonItemProperties, + bounds: &LayoutRect, + apply_pipeline_clip: bool ) -> (LayoutPrimitiveInfo, LayoutRect, ScrollNodeAndClipChain) { let clip_and_scroll = self.get_clip_and_scroll( &common.clip_id, &common.spatial_id, apply_pipeline_clip ); let current_offset = self.current_offset(clip_and_scroll.spatial_node_index); let snap_to_device = &mut self.sc_stack.last_mut().unwrap().snap_to_device; snap_to_device.set_target_spatial_node( clip_and_scroll.spatial_node_index, &self.clip_scroll_tree ); - let clip_rect = snap_to_device.snap_rect( - &common.clip_rect.translate(current_offset) - ); - - let rect = bounds.map_or(clip_rect, |bounds| { - snap_to_device.snap_rect(&bounds.translate(current_offset)) - }); + let clip_rect = common.clip_rect.translate(current_offset); + let rect = bounds.translate(current_offset); let layout = LayoutPrimitiveInfo { - rect, - clip_rect, + rect: snap_to_device.snap_rect(&rect), + clip_rect: snap_to_device.snap_rect(&clip_rect), flags: common.flags, hit_info: common.hit_info, }; (layout, rect, clip_and_scroll) } - fn process_common_properties_with_bounds( - &mut self, - common: &CommonItemProperties, - bounds: &LayoutRect, - apply_pipeline_clip: bool, - ) -> (LayoutPrimitiveInfo, LayoutRect, ScrollNodeAndClipChain) { - self.process_common_properties( - common, - Some(bounds), - apply_pipeline_clip, - ) - } - pub fn snap_rect( &mut self, rect: &LayoutRect, target_spatial_node: SpatialNodeIndex, ) -> LayoutRect { let snap_to_device = &mut self.sc_stack.last_mut().unwrap().snap_to_device; snap_to_device.set_target_spatial_node( target_spatial_node, @@ -1141,45 +1136,42 @@ impl<'a> SceneBuilder<'a> { &layout, &info.font_key, &info.color, item.glyphs(), info.glyph_options, ); } DisplayItem::Rectangle(ref info) => { - let (layout, _, clip_and_scroll) = self.process_common_properties( + let (layout, clip_and_scroll) = self.process_common_properties( &info.common, - None, apply_pipeline_clip, ); self.add_solid_rectangle( clip_and_scroll, &layout, info.color, ); } DisplayItem::HitTest(ref info) => { - let (layout, _, clip_and_scroll) = self.process_common_properties( + let (layout, clip_and_scroll) = self.process_common_properties( &info.common, - None, apply_pipeline_clip, ); self.add_solid_rectangle( clip_and_scroll, &layout, ColorF::TRANSPARENT, ); } DisplayItem::ClearRectangle(ref info) => { - let (layout, _, clip_and_scroll) = self.process_common_properties( + let (layout, clip_and_scroll) = self.process_common_properties( &info.common, - None, apply_pipeline_clip, ); self.add_clear_rectangle( clip_and_scroll, &layout, ); } @@ -1422,19 +1414,18 @@ impl<'a> SceneBuilder<'a> { DisplayItem::StickyFrame(ref info) => { let parent_space = self.get_space(&info.parent_spatial_id); self.build_sticky_frame( info, parent_space, ); } DisplayItem::BackdropFilter(ref info) => { - let (layout, _, clip_and_scroll) = self.process_common_properties( + let (layout, clip_and_scroll) = self.process_common_properties( &info.common, - None, apply_pipeline_clip, ); let filters = filter_ops_for_compositing(item.filters()); let filter_datas = filter_datas_for_compositing(item.filter_datas()); let filter_primitives = filter_primitives_for_compositing(item.filter_primitives()); self.add_backdrop_filter(