mirror of
https://github.com/servo/servo.git
synced 2025-07-22 23:03:42 +01:00
Replace the WebRenderDisplayItemConverter trait with an inherent method
This commit is contained in:
parent
e852d02f1c
commit
526619a78a
6 changed files with 6 additions and 27 deletions
|
@ -17,10 +17,6 @@ use webrender_api::{
|
|||
RasterSpace, ReferenceFrameKind, SpaceAndClipInfo, SpatialId, StackingContext,
|
||||
};
|
||||
|
||||
pub trait WebRenderDisplayListConverter {
|
||||
fn convert_to_webrender(&mut self, pipeline_id: PipelineId) -> DisplayListBuilder;
|
||||
}
|
||||
|
||||
struct ClipScrollState {
|
||||
clip_ids: Vec<Option<ClipId>>,
|
||||
spatial_ids: Vec<Option<SpatialId>>,
|
||||
|
@ -28,17 +24,8 @@ struct ClipScrollState {
|
|||
active_spatial_id: SpatialId,
|
||||
}
|
||||
|
||||
trait WebRenderDisplayItemConverter {
|
||||
fn convert_to_webrender(
|
||||
&mut self,
|
||||
clip_scroll_nodes: &[ClipScrollNode],
|
||||
state: &mut ClipScrollState,
|
||||
builder: &mut DisplayListBuilder,
|
||||
);
|
||||
}
|
||||
|
||||
impl WebRenderDisplayListConverter for DisplayList {
|
||||
fn convert_to_webrender(&mut self, pipeline_id: PipelineId) -> DisplayListBuilder {
|
||||
impl DisplayList {
|
||||
pub fn convert_to_webrender(&mut self, pipeline_id: PipelineId) -> DisplayListBuilder {
|
||||
let mut clip_ids = vec![None; self.clip_scroll_nodes.len()];
|
||||
let mut spatial_ids = vec![None; self.clip_scroll_nodes.len()];
|
||||
|
||||
|
@ -75,7 +62,7 @@ impl WebRenderDisplayListConverter for DisplayList {
|
|||
}
|
||||
}
|
||||
|
||||
impl WebRenderDisplayItemConverter for DisplayItem {
|
||||
impl DisplayItem {
|
||||
fn convert_to_webrender(
|
||||
&mut self,
|
||||
clip_scroll_nodes: &[ClipScrollNode],
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue