mirror of
https://github.com/servo/servo.git
synced 2025-08-05 21:50:18 +01:00
Move CompositionPipeline out of the pipeline module.
This commit is contained in:
parent
1a34137ac4
commit
383cdd450f
3 changed files with 15 additions and 11 deletions
|
@ -3,6 +3,7 @@
|
||||||
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||||
|
|
||||||
use AnimationTickType;
|
use AnimationTickType;
|
||||||
|
use CompositionPipeline;
|
||||||
use CompositorMsg as ConstellationMsg;
|
use CompositorMsg as ConstellationMsg;
|
||||||
use SendableFrameTree;
|
use SendableFrameTree;
|
||||||
use app_units::Au;
|
use app_units::Au;
|
||||||
|
@ -33,7 +34,6 @@ use msg::constellation_msg::{Image, PixelFormat};
|
||||||
use msg::constellation_msg::{Key, KeyModifiers, KeyState, LoadData};
|
use msg::constellation_msg::{Key, KeyModifiers, KeyState, LoadData};
|
||||||
use msg::constellation_msg::{NavigationDirection, PipelineId, PipelineIndex, PipelineNamespaceId};
|
use msg::constellation_msg::{NavigationDirection, PipelineId, PipelineIndex, PipelineNamespaceId};
|
||||||
use msg::constellation_msg::{WindowSizeData, WindowSizeType};
|
use msg::constellation_msg::{WindowSizeData, WindowSizeType};
|
||||||
use pipeline::CompositionPipeline;
|
|
||||||
use profile_traits::mem::{self, ReportKind, Reporter, ReporterRequest};
|
use profile_traits::mem::{self, ReportKind, Reporter, ReporterRequest};
|
||||||
use profile_traits::time::{self, ProfilerCategory, profile};
|
use profile_traits::time::{self, ProfilerCategory, profile};
|
||||||
use script_traits::CompositorEvent::{MouseMoveEvent, MouseButtonEvent, TouchEvent};
|
use script_traits::CompositorEvent::{MouseMoveEvent, MouseButtonEvent, TouchEvent};
|
||||||
|
|
|
@ -43,13 +43,16 @@ extern crate webrender_traits;
|
||||||
|
|
||||||
pub use compositor_thread::{CompositorEventListener, CompositorProxy, CompositorThread};
|
pub use compositor_thread::{CompositorEventListener, CompositorProxy, CompositorThread};
|
||||||
use euclid::size::{Size2D, TypedSize2D};
|
use euclid::size::{Size2D, TypedSize2D};
|
||||||
|
use gfx::paint_thread::ChromeToPaintMsg;
|
||||||
use gfx_traits::Epoch;
|
use gfx_traits::Epoch;
|
||||||
use ipc_channel::ipc::{IpcSender};
|
use ipc_channel::ipc::{IpcSender};
|
||||||
|
use layout_traits::LayoutControlChan;
|
||||||
use msg::constellation_msg::{FrameId, Key, KeyState, KeyModifiers, LoadData};
|
use msg::constellation_msg::{FrameId, Key, KeyState, KeyModifiers, LoadData};
|
||||||
use msg::constellation_msg::{NavigationDirection, PipelineId, SubpageId};
|
use msg::constellation_msg::{NavigationDirection, PipelineId, SubpageId};
|
||||||
use msg::constellation_msg::{WebDriverCommandMsg, WindowSizeData, WindowSizeType};
|
use msg::constellation_msg::{WebDriverCommandMsg, WindowSizeData, WindowSizeType};
|
||||||
use pipeline::CompositionPipeline;
|
use script_traits::ConstellationControlMsg;
|
||||||
use std::collections::HashMap;
|
use std::collections::HashMap;
|
||||||
|
use std::sync::mpsc::Sender;
|
||||||
use url::Url;
|
use url::Url;
|
||||||
use util::geometry::PagePx;
|
use util::geometry::PagePx;
|
||||||
|
|
||||||
|
@ -104,3 +107,12 @@ pub struct SendableFrameTree {
|
||||||
pub size: Option<TypedSize2D<PagePx, f32>>,
|
pub size: Option<TypedSize2D<PagePx, f32>>,
|
||||||
pub children: Vec<SendableFrameTree>,
|
pub children: Vec<SendableFrameTree>,
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// The subset of the pipeline that is needed for layer composition.
|
||||||
|
#[derive(Clone)]
|
||||||
|
pub struct CompositionPipeline {
|
||||||
|
pub id: PipelineId,
|
||||||
|
pub script_chan: IpcSender<ConstellationControlMsg>,
|
||||||
|
pub layout_chan: LayoutControlChan,
|
||||||
|
pub chrome_to_paint_chan: Sender<ChromeToPaintMsg>,
|
||||||
|
}
|
||||||
|
|
|
@ -2,6 +2,7 @@
|
||||||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||||
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||||
|
|
||||||
|
use CompositionPipeline;
|
||||||
use CompositorProxy;
|
use CompositorProxy;
|
||||||
use compositor_thread;
|
use compositor_thread;
|
||||||
use compositor_thread::Msg as CompositorMsg;
|
use compositor_thread::Msg as CompositorMsg;
|
||||||
|
@ -60,15 +61,6 @@ pub struct Pipeline {
|
||||||
pub is_private: bool,
|
pub is_private: bool,
|
||||||
}
|
}
|
||||||
|
|
||||||
/// The subset of the pipeline that is needed for layer composition.
|
|
||||||
#[derive(Clone)]
|
|
||||||
pub struct CompositionPipeline {
|
|
||||||
pub id: PipelineId,
|
|
||||||
pub script_chan: IpcSender<ConstellationControlMsg>,
|
|
||||||
pub layout_chan: LayoutControlChan,
|
|
||||||
pub chrome_to_paint_chan: Sender<ChromeToPaintMsg>,
|
|
||||||
}
|
|
||||||
|
|
||||||
/// Initial setup data needed to construct a pipeline.
|
/// Initial setup data needed to construct a pipeline.
|
||||||
///
|
///
|
||||||
/// *DO NOT* add any Senders to this unless you absolutely know what you're doing, or pcwalton will
|
/// *DO NOT* add any Senders to this unless you absolutely know what you're doing, or pcwalton will
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue