Bug 1410893 - Update bindings for API changes in WR PR 1923. r?jrmuizel draft
authorAlexis Beingessner <a.beingessner@gmail.com>
Fri, 27 Oct 2017 08:56:31 -0400
changeset 687579 8b398da57fb35bdf406a9ee1f6db3f18a6c1bc29
parent 687578 1009a883b5cc4e639599b849fe2ebbbfdad2a7af
child 687580 ea20a281537c77c773feb05676dadfb7e635763b
push id86545
push userkgupta@mozilla.com
push dateFri, 27 Oct 2017 12:57:31 +0000
reviewersjrmuizel
bugs1410893
milestone58.0a1
Bug 1410893 - Update bindings for API changes in WR PR 1923. r?jrmuizel MozReview-Commit-ID: G7qfzaX6mxb
gfx/webrender_bindings/src/bindings.rs
--- a/gfx/webrender_bindings/src/bindings.rs
+++ b/gfx/webrender_bindings/src/bindings.rs
@@ -1523,45 +1523,30 @@ pub extern "C" fn wr_dp_pop_all_shadows(
     state.frame_builder.dl_builder.pop_all_shadows();
 }
 
 #[no_mangle]
 pub extern "C" fn wr_dp_push_line(state: &mut WrState,
                                   clip: &LayoutRect,
                                   is_backface_visible: bool,
                                   bounds: &LayoutRect,
-                                  _wavy_line_thickness: f32,
+                                  wavy_line_thickness: f32,
                                   orientation: LineOrientation,
                                   color: &ColorF,
                                   style: LineStyle) {
     debug_assert!(unsafe { is_in_main_thread() });
 
-    // TODO: remove this once WR is updated to just check the bounds.
-    let (baseline, start, end, width) = match orientation {
-        LineOrientation::Horizontal => (bounds.origin.y,
-                                        bounds.origin.x,
-                                        bounds.origin.x + bounds.size.width,
-                                        bounds.size.height),
-        LineOrientation::Vertical => (bounds.origin.x,
-                                      bounds.origin.y,
-                                      bounds.origin.y + bounds.size.height,
-                                      bounds.size.width),
-    };
-
     let mut prim_info = LayoutPrimitiveInfo::with_clip_rect(*bounds, (*clip).into());
     prim_info.is_backface_visible = is_backface_visible;
     state.frame_builder
          .dl_builder
          .push_line(&prim_info,
-                    baseline,
-                    start,
-                    end,
+                    wavy_line_thickness,
                     orientation,
-                    width,
-                    *color,
+                    color,
                     style);
 
 }
 
 #[no_mangle]
 pub extern "C" fn wr_dp_push_border(state: &mut WrState,
                                     rect: LayoutRect,
                                     clip: LayoutRect,