mirror of
https://github.com/servo/servo.git
synced 2025-07-22 23:03:42 +01:00
Auto merge of #14386 - mrobinson:display-list-builder-updates, r=glennw
Use new DisplayListBuilder improvements in Servo <!-- Please describe your changes on the following line: --> --- <!-- Thank you for contributing to Servo! Please replace each `[ ]` by `[X]` when the step is complete, and replace `__` with appropriate data: --> - [x] `./mach build -d` does not report any errors - [x] `./mach test-tidy` does not report any errors - [ ] These changes fix #__ (github issue number if applicable). <!-- Either: --> - [ ] There are tests for these changes OR - [x] These changes do not require tests because they should not change behavior. <!-- Pull requests that do not address these steps are welcome, but they will require additional verification as part of the review process. --> In particular, we no longer to have a WebRenderFrameBuilder. All of the complication is now handled by the DisplayListBuilder itself. <!-- Reviewable:start --> --- This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/14386) <!-- Reviewable:end -->
This commit is contained in:
commit
1c6963144d
3 changed files with 71 additions and 114 deletions
|
@ -75,7 +75,7 @@ use layout::query::{process_node_geometry_request, process_node_scroll_area_requ
|
|||
use layout::query::process_offset_parent_query;
|
||||
use layout::sequential;
|
||||
use layout::traversal::{ComputeAbsolutePositions, RecalcStyleAndConstructFlows};
|
||||
use layout::webrender_helpers::{WebRenderDisplayListConverter, WebRenderFrameBuilder};
|
||||
use layout::webrender_helpers::WebRenderDisplayListConverter;
|
||||
use layout::wrapper::LayoutNodeLayoutData;
|
||||
use layout::wrapper::drop_style_and_layout_data;
|
||||
use layout_traits::LayoutThreadFactory;
|
||||
|
@ -947,10 +947,7 @@ impl LayoutThread {
|
|||
debug!("Layout done!");
|
||||
|
||||
// TODO: Avoid the temporary conversion and build webrender sc/dl directly!
|
||||
let pipeline_id = self.id.to_webrender();
|
||||
let mut frame_builder = WebRenderFrameBuilder::new(pipeline_id);
|
||||
let built_display_list = rw_data.display_list.as_ref().unwrap().convert_to_webrender(
|
||||
&mut frame_builder);
|
||||
let builder = rw_data.display_list.as_ref().unwrap().convert_to_webrender(self.id);
|
||||
|
||||
let viewport_size = Size2D::new(self.viewport_size.width.to_f32_px(),
|
||||
self.viewport_size.height.to_f32_px());
|
||||
|
@ -961,10 +958,8 @@ impl LayoutThread {
|
|||
self.webrender_api.set_root_display_list(
|
||||
get_root_flow_background_color(layout_root),
|
||||
webrender_traits::Epoch(epoch_number),
|
||||
pipeline_id,
|
||||
viewport_size,
|
||||
built_display_list,
|
||||
frame_builder.auxiliary_lists_builder.finalize());
|
||||
builder);
|
||||
});
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue