зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1355590 - Fix WrClipRegion/WrRect mismatch in a couple of Rust FFI functions. r=mtseng
MozReview-Commit-ID: 4gUyk4cRTAo
This commit is contained in:
Родитель
a065863ed2
Коммит
8318f4c805
|
@ -1275,7 +1275,7 @@ pub extern "C" fn wr_dp_push_border_image(state: &mut WrState,
|
|||
}
|
||||
|
||||
#[no_mangle]
|
||||
pub extern "C" fn wr_dp_push_border_gradient(state: &mut WrState, rect: WrRect, clip: WrRect,
|
||||
pub extern "C" fn wr_dp_push_border_gradient(state: &mut WrState, rect: WrRect, clip: WrClipRegion,
|
||||
widths: WrBorderWidths,
|
||||
start_point: WrPoint, end_point: WrPoint,
|
||||
stops: *const WrGradientStop, stops_count: usize,
|
||||
|
@ -1283,7 +1283,6 @@ pub extern "C" fn wr_dp_push_border_gradient(state: &mut WrState, rect: WrRect,
|
|||
outset: WrSideOffsets2Df32) {
|
||||
assert!( unsafe { is_in_main_thread() });
|
||||
let stops = WrGradientStop::to_gradient_stops(unsafe { slice::from_raw_parts(stops, stops_count) });
|
||||
let clip_region = state.frame_builder.dl_builder.new_clip_region(&clip.to_rect(), Vec::new(), None);
|
||||
let border_details = BorderDetails::Gradient(GradientBorder {
|
||||
gradient: state.frame_builder.dl_builder.create_gradient(
|
||||
start_point.to_point(), end_point.to_point(),
|
||||
|
@ -1292,13 +1291,13 @@ pub extern "C" fn wr_dp_push_border_gradient(state: &mut WrState, rect: WrRect,
|
|||
});
|
||||
state.frame_builder.dl_builder.push_border(
|
||||
rect.to_rect(),
|
||||
clip_region,
|
||||
clip.to_clip_region(),
|
||||
widths.to_border_widths(),
|
||||
border_details);
|
||||
}
|
||||
|
||||
#[no_mangle]
|
||||
pub extern "C" fn wr_dp_push_border_radial_gradient(state: &mut WrState, rect: WrRect, clip: WrRect,
|
||||
pub extern "C" fn wr_dp_push_border_radial_gradient(state: &mut WrState, rect: WrRect, clip: WrClipRegion,
|
||||
widths: WrBorderWidths,
|
||||
center: WrPoint,
|
||||
radius: WrSize,
|
||||
|
@ -1307,7 +1306,6 @@ pub extern "C" fn wr_dp_push_border_radial_gradient(state: &mut WrState, rect: W
|
|||
outset: WrSideOffsets2Df32) {
|
||||
assert!( unsafe { is_in_main_thread() });
|
||||
let stops = WrGradientStop::to_gradient_stops(unsafe { slice::from_raw_parts(stops, stops_count) });
|
||||
let clip_region = state.frame_builder.dl_builder.new_clip_region(&clip.to_rect(), Vec::new(), None);
|
||||
let border_details = BorderDetails::RadialGradient(RadialGradientBorder {
|
||||
gradient: state.frame_builder.dl_builder.create_radial_gradient(center.to_point(),
|
||||
radius.to_size(),
|
||||
|
@ -1317,7 +1315,7 @@ pub extern "C" fn wr_dp_push_border_radial_gradient(state: &mut WrState, rect: W
|
|||
});
|
||||
state.frame_builder.dl_builder.push_border(
|
||||
rect.to_rect(),
|
||||
clip_region,
|
||||
clip.to_clip_region(),
|
||||
widths.to_border_widths(),
|
||||
border_details);
|
||||
}
|
||||
|
|
Загрузка…
Ссылка в новой задаче