Bug 1516652 - Update for API changes in WR PR #3450. r=kats
authorDzmitry Malyshau <dmalyshau@mozilla.com>
Fri, 28 Dec 2018 16:29:38 +0000
changeset 509180 e16d8ebb698f5dd4fae9234d0ecb26edd58f3a12
parent 509179 c680b0a86e0f64c05d1fba73cd275ad7de5bcbc9
child 509181 69cc7fba27dec865c30895f9e63e375afc7cf396
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
bugs1516652
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 1516652 - Update for API changes in WR PR #3450. r=kats Depends on D15472 Differential Revision: https://phabricator.services.mozilla.com/D15473
gfx/webrender_bindings/src/bindings.rs
--- a/gfx/webrender_bindings/src/bindings.rs
+++ b/gfx/webrender_bindings/src/bindings.rs
@@ -1849,17 +1849,17 @@ pub extern "C" fn wr_dp_restore(state: &
 
 #[no_mangle]
 pub extern "C" fn wr_dp_clear_save(state: &mut WrState) {
     state.frame_builder.dl_builder.clear_save();
 }
 
 #[no_mangle]
 pub extern "C" fn wr_dp_push_stacking_context(state: &mut WrState,
-                                              bounds: LayoutRect,
+                                              mut bounds: LayoutRect,
                                               clip_node_id: *const WrClipId,
                                               animation: *const WrAnimationProperty,
                                               opacity: *const f32,
                                               transform: *const LayoutTransform,
                                               transform_style: TransformStyle,
                                               perspective: *const LayoutTransform,
                                               mix_blend_mode: MixBlendMode,
                                               filters: *const WrFilterOp,
@@ -1935,32 +1935,32 @@ pub extern "C" fn wr_dp_push_stacking_co
     }
 
     let perspective_ref = unsafe { perspective.as_ref() };
     let perspective = match perspective_ref {
         Some(perspective) => Some(perspective.clone()),
         None => None,
     };
 
-    let mut prim_info = LayoutPrimitiveInfo::new(bounds);
-
     *out_is_reference_frame = transform_binding.is_some() || perspective.is_some();
     if *out_is_reference_frame {
         let ref_frame_id = state.frame_builder
             .dl_builder
-            .push_reference_frame(&prim_info, transform_style, transform_binding, perspective);
+            .push_reference_frame(&bounds, transform_style, transform_binding, perspective);
         *out_reference_frame_id = pack_clip_id(ref_frame_id);
 
-        prim_info.rect.origin = LayoutPoint::zero();
-        prim_info.clip_rect.origin = LayoutPoint::zero();
+        bounds.origin = LayoutPoint::zero();
         state.frame_builder.dl_builder.push_clip_id(ref_frame_id);
     }
 
-    prim_info.is_backface_visible = is_backface_visible;
-    prim_info.tag = state.current_tag;
+    let prim_info = LayoutPrimitiveInfo {
+        is_backface_visible,
+        tag: state.current_tag,
+        .. LayoutPrimitiveInfo::new(bounds)
+    };
 
     state.frame_builder
          .dl_builder
          .push_stacking_context(&prim_info,
                                 clip_node_id,
                                 transform_style,
                                 mix_blend_mode,
                                 &filters,