Skip to content
Permalink
Browse files

layout: set building information for media fragment

  • Loading branch information...
ceyusa authored and ferjm committed Aug 27, 2018
1 parent bdd3e2c commit 006bef5eb5a96744b0dae1e8cc8fec2bbee0edc4
Showing with 16 additions and 0 deletions.
  1. +16 −0 components/layout/display_list/builder.rs
@@ -1999,6 +1999,22 @@ impl FragmentDisplayListBuilding for Fragment {
}
}
},
SpecificFragmentInfo::Media(ref fragment_info) => {
if let Some((ref image_key, _, _)) = fragment_info.frame_source.get_current_frame()
{
let base = create_base_display_item(state);
state.add_image_item(
base,
webrender_api::ImageDisplayItem {
image_key: *image_key,
stretch_size: stacking_relative_border_box.size.to_layout(),
tile_spacing: LayoutSize::zero(),
image_rendering: ImageRendering::Auto,
alpha_type: webrender_api::AlphaType::PremultipliedAlpha,
},
);
}
}
SpecificFragmentInfo::Canvas(ref canvas_fragment_info) => {
let image_key = match canvas_fragment_info.source {
CanvasFragmentSource::WebGL(image_key) => image_key,

0 comments on commit 006bef5

Please sign in to comment.
You can’t perform that action at this time.