Replace the WebRenderDisplayItemConverter trait with an inherent method

This commit is contained in:
Simon Sapin 2019-09-06 16:59:11 +02:00
parent e852d02f1c
commit 526619a78a
6 changed files with 6 additions and 27 deletions

View file

@ -2,7 +2,5 @@
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at https://mozilla.org/MPL/2.0/. */
pub use self::webrender_helpers::WebRenderDisplayListConverter;
pub mod items;
mod webrender_helpers;

View file

@ -7,12 +7,8 @@ use msg::constellation_msg::PipelineId;
use webrender_api::units::LayoutSize;
use webrender_api::{self, DisplayListBuilder};
pub trait WebRenderDisplayListConverter {
fn convert_to_webrender(&mut self, pipeline_id: PipelineId) -> 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 webrender_pipeline = pipeline_id.to_webrender();
let builder = DisplayListBuilder::with_capacity(