diff options
author | Pyfisch <pyfisch@gmail.com> | 2018-01-07 22:53:51 +0100 |
---|---|---|
committer | Pyfisch <pyfisch@gmail.com> | 2018-01-07 22:53:51 +0100 |
commit | 246b54507a336d9ac0d9c483934e53a516113d96 (patch) | |
tree | 8f4acd8f3db81ba29208fd8ab4fa1e2ae1af16f0 /components/layout_thread/lib.rs | |
parent | 71e542c424fc5fa9429c5985a09128f9dd4c2616 (diff) | |
download | servo-246b54507a336d9ac0d9c483934e53a516113d96.tar.gz servo-246b54507a336d9ac0d9c483934e53a516113d96.zip |
Use the new WebRender conversion functions.
Remove the old ones.
Diffstat (limited to 'components/layout_thread/lib.rs')
-rw-r--r-- | components/layout_thread/lib.rs | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/components/layout_thread/lib.rs b/components/layout_thread/lib.rs index af99ec99c73..2c72bd6f4b7 100644 --- a/components/layout_thread/lib.rs +++ b/components/layout_thread/lib.rs @@ -69,7 +69,7 @@ use layout::context::LayoutContext; use layout::context::RegisteredPainter; use layout::context::RegisteredPainters; use layout::context::malloc_size_of_persistent_local_context; -use layout::display_list::{ToGfxColor, WebRenderDisplayListConverter}; +use layout::display_list::WebRenderDisplayListConverter; use layout::flow::{Flow, GetBaseFlow, ImmutableFlowUtils, MutableOwnedFlowUtils}; use layout::flow_ref::FlowRef; use layout::incremental::{LayoutDamageComputation, RelayoutMode, SpecialRestyleDamage}; @@ -1688,10 +1688,15 @@ fn get_root_flow_background_color(flow: &mut Flow) -> webrender_api::ColorF { } let kid_block_flow = kid.as_block(); - kid_block_flow.fragment + let color = kid_block_flow.fragment .style - .resolve_color(kid_block_flow.fragment.style.get_background().background_color) - .to_gfx_color() + .resolve_color(kid_block_flow.fragment.style.get_background().background_color); + webrender_api::ColorF::new( + color.red_f32(), + color.green_f32(), + color.blue_f32(), + color.alpha_f32(), + ) } fn get_ua_stylesheets() -> Result<UserAgentStylesheets, &'static str> { |