--- a/gfx/webrender_bindings/src/bindings.rs
+++ b/gfx/webrender_bindings/src/bindings.rs
@@ -1367,33 +1367,35 @@ pub extern "C" fn wr_dp_push_iframe(stat
#[no_mangle]
pub extern "C" fn wr_dp_push_rect(state: &mut WrState,
rect: WrRect,
clip: WrRect,
color: WrColor) {
assert!(unsafe { !is_in_render_thread() });
- state.frame_builder.dl_builder.push_rect(rect.into(), clip.into(), color.into());
+ state.frame_builder.dl_builder.push_rect(rect.into(),
+ Some(LocalClip::Rect(clip.into())),
+ color.into());
}
#[no_mangle]
pub extern "C" fn wr_dp_push_image(state: &mut WrState,
bounds: WrRect,
clip: WrRect,
stretch_size: WrSize,
tile_spacing: WrSize,
image_rendering: WrImageRendering,
key: WrImageKey) {
assert!(unsafe { is_in_main_thread() || is_in_compositor_thread() });
state.frame_builder
.dl_builder
.push_image(bounds.into(),
- clip.into(),
+ Some(LocalClip::Rect(clip.into())),
stretch_size.into(),
tile_spacing.into(),
image_rendering,
key);
}
/// Push a 3 planar yuv image.
#[no_mangle]
@@ -1405,17 +1407,17 @@ pub extern "C" fn wr_dp_push_yuv_planar_
image_key_2: WrImageKey,
color_space: WrYuvColorSpace,
image_rendering: WrImageRendering) {
assert!(unsafe { is_in_main_thread() || is_in_compositor_thread() });
state.frame_builder
.dl_builder
.push_yuv_image(bounds.into(),
- clip.into(),
+ Some(LocalClip::Rect(clip.into())),
YuvData::PlanarYCbCr(image_key_0, image_key_1, image_key_2),
color_space,
image_rendering);
}
/// Push a 2 planar NV12 image.
#[no_mangle]
pub extern "C" fn wr_dp_push_yuv_NV12_image(state: &mut WrState,
@@ -1425,17 +1427,17 @@ pub extern "C" fn wr_dp_push_yuv_NV12_im
image_key_1: WrImageKey,
color_space: WrYuvColorSpace,
image_rendering: WrImageRendering) {
assert!(unsafe { is_in_main_thread() || is_in_compositor_thread() });
state.frame_builder
.dl_builder
.push_yuv_image(bounds.into(),
- clip.into(),
+ Some(LocalClip::Rect(clip.into())),
YuvData::NV12(image_key_0, image_key_1),
color_space,
image_rendering);
}
/// Push a yuv interleaved image.
#[no_mangle]
pub extern "C" fn wr_dp_push_yuv_interleaved_image(state: &mut WrState,
@@ -1444,17 +1446,17 @@ pub extern "C" fn wr_dp_push_yuv_interle
image_key_0: WrImageKey,
color_space: WrYuvColorSpace,
image_rendering: WrImageRendering) {
assert!(unsafe { is_in_main_thread() || is_in_compositor_thread() });
state.frame_builder
.dl_builder
.push_yuv_image(bounds.into(),
- clip.into(),
+ Some(LocalClip::Rect(clip.into())),
YuvData::InterleavedYCbCr(image_key_0),
color_space,
image_rendering);
}
#[no_mangle]
pub extern "C" fn wr_dp_push_text(state: &mut WrState,
bounds: WrRect,
@@ -1470,17 +1472,17 @@ pub extern "C" fn wr_dp_push_text(state:
let glyph_vector: Vec<_> = glyph_slice.iter().map(|x| x.into()).collect();
let colorf = ColorF::new(color.r, color.g, color.b, color.a);
let glyph_options = None; // TODO
state.frame_builder
.dl_builder
.push_text(bounds.into(),
- clip.into(),
+ Some(LocalClip::Rect(clip.into())),
&glyph_vector,
font_key,
colorf,
Au::from_f32_px(glyph_size),
0.0,
glyph_options);
}
@@ -1500,17 +1502,20 @@ pub extern "C" fn wr_dp_push_border(stat
left: left.into(),
right: right.into(),
top: top.into(),
bottom: bottom.into(),
radius: radius.into(),
});
state.frame_builder
.dl_builder
- .push_border(rect.into(), clip.into(), widths.into(), border_details);
+ .push_border(rect.into(),
+ Some(LocalClip::Rect(clip.into())),
+ widths.into(),
+ border_details);
}
#[no_mangle]
pub extern "C" fn wr_dp_push_border_image(state: &mut WrState,
rect: WrRect,
clip: WrRect,
widths: WrBorderWidths,
image: WrImageKey,
@@ -1525,17 +1530,20 @@ pub extern "C" fn wr_dp_push_border_imag
patch: patch.into(),
fill: false,
outset: outset.into(),
repeat_horizontal: repeat_horizontal.into(),
repeat_vertical: repeat_vertical.into(),
});
state.frame_builder
.dl_builder
- .push_border(rect.into(), clip.into(), widths.into(), border_details);
+ .push_border(rect.into(),
+ Some(LocalClip::Rect(clip.into())),
+ widths.into(),
+ border_details);
}
#[no_mangle]
pub extern "C" fn wr_dp_push_border_gradient(state: &mut WrState,
rect: WrRect,
clip: WrRect,
widths: WrBorderWidths,
start_point: WrPoint,
@@ -1556,17 +1564,20 @@ pub extern "C" fn wr_dp_push_border_grad
.create_gradient(start_point.into(),
end_point.into(),
stops_vector,
extend_mode.into()),
outset: outset.into(),
});
state.frame_builder
.dl_builder
- .push_border(rect.into(), clip.into(), widths.into(), border_details);
+ .push_border(rect.into(),
+ Some(LocalClip::Rect(clip.into())),
+ widths.into(),
+ border_details);
}
#[no_mangle]
pub extern "C" fn wr_dp_push_border_radial_gradient(state: &mut WrState,
rect: WrRect,
clip: WrRect,
widths: WrBorderWidths,
center: WrPoint,
@@ -1588,17 +1599,20 @@ pub extern "C" fn wr_dp_push_border_radi
.create_radial_gradient(center.into(),
radius.into(),
stops_vector,
extend_mode.into()),
outset: outset.into(),
});
state.frame_builder
.dl_builder
- .push_border(rect.into(), clip.into(), widths.into(), border_details);
+ .push_border(rect.into(),
+ Some(LocalClip::Rect(clip.into())),
+ widths.into(),
+ border_details);
}
#[no_mangle]
pub extern "C" fn wr_dp_push_linear_gradient(state: &mut WrState,
rect: WrRect,
clip: WrRect,
start_point: WrPoint,
end_point: WrPoint,
@@ -1613,22 +1627,23 @@ pub extern "C" fn wr_dp_push_linear_grad
let stops_vector = stops_slice.iter().map(|x| x.into()).collect();
let gradient = state.frame_builder
.dl_builder
.create_gradient(start_point.into(),
end_point.into(),
stops_vector,
extend_mode.into());
- let rect = rect.into();
- let tile_size = tile_size.into();
- let tile_spacing = tile_spacing.into();
state.frame_builder
.dl_builder
- .push_gradient(rect, clip.into(), gradient, tile_size, tile_spacing);
+ .push_gradient(rect.into(),
+ Some(LocalClip::Rect(clip.into())),
+ gradient,
+ tile_size.into(),
+ tile_spacing.into());
}
#[no_mangle]
pub extern "C" fn wr_dp_push_radial_gradient(state: &mut WrState,
rect: WrRect,
clip: WrRect,
center: WrPoint,
radius: WrSize,
@@ -1643,22 +1658,23 @@ pub extern "C" fn wr_dp_push_radial_grad
let stops_vector = stops_slice.iter().map(|x| x.into()).collect();
let gradient = state.frame_builder
.dl_builder
.create_radial_gradient(center.into(),
radius.into(),
stops_vector,
extend_mode.into());
- let rect = rect.into();
- let tile_size = tile_size.into();
- let tile_spacing = tile_spacing.into();
state.frame_builder
.dl_builder
- .push_radial_gradient(rect, clip.into(), gradient, tile_size, tile_spacing);
+ .push_radial_gradient(rect.into(),
+ Some(LocalClip::Rect(clip.into())),
+ gradient,
+ tile_size.into(),
+ tile_spacing.into());
}
#[no_mangle]
pub extern "C" fn wr_dp_push_box_shadow(state: &mut WrState,
rect: WrRect,
clip: WrRect,
box_bounds: WrRect,
offset: WrPoint,
@@ -1667,17 +1683,17 @@ pub extern "C" fn wr_dp_push_box_shadow(
spread_radius: f32,
border_radius: f32,
clip_mode: WrBoxShadowClipMode) {
assert!(unsafe { is_in_main_thread() });
state.frame_builder
.dl_builder
.push_box_shadow(rect.into(),
- clip.into(),
+ Some(LocalClip::Rect(clip.into())),
box_bounds.into(),
offset.into(),
color.into(),
blur_radius,
spread_radius,
border_radius,
clip_mode);
}