mirror of
https://github.com/servo/servo.git
synced 2025-08-05 05:30:08 +01:00
Implement new Webrender PushTextShadow API
Also includes an incidental bugfix for the rendering order of text decorations. This change depends on servo/webrender#1454 being merged and upstreamed to servo.
This commit is contained in:
parent
1b6d29e319
commit
2d3eae3e3a
3 changed files with 106 additions and 67 deletions
|
@ -289,7 +289,6 @@ impl WebRenderDisplayItemConverter for DisplayItem {
|
|||
item.text_run.font_key,
|
||||
item.text_color,
|
||||
item.text_run.actual_pt_size,
|
||||
item.blur_radius.to_f32_px(),
|
||||
None);
|
||||
}
|
||||
}
|
||||
|
@ -449,6 +448,19 @@ impl WebRenderDisplayItemConverter for DisplayItem {
|
|||
item.border_radius.to_f32_px(),
|
||||
item.clip_mode.to_clip_mode());
|
||||
}
|
||||
DisplayItem::PushTextShadow(ref item) => {
|
||||
let rect = item.base.bounds.to_rectf();
|
||||
builder.push_text_shadow(rect,
|
||||
Some(item.base.local_clip),
|
||||
webrender_api::TextShadow {
|
||||
blur_radius: item.blur_radius.to_f32_px(),
|
||||
offset: item.offset.to_vectorf(),
|
||||
color: item.color,
|
||||
});
|
||||
}
|
||||
DisplayItem::PopTextShadow(_) => {
|
||||
builder.pop_text_shadow();
|
||||
}
|
||||
DisplayItem::Iframe(ref item) => {
|
||||
let rect = item.base.bounds.to_rectf();
|
||||
let pipeline_id = item.iframe.to_webrender();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue