mirror of
https://github.com/servo/servo.git
synced 2025-08-06 06:00:15 +01:00
auto merge of #2448 : mbrubeck/servo/priv-compositor, r=pcwalton
This commit is contained in:
commit
f11e860698
1 changed files with 23 additions and 23 deletions
|
@ -43,76 +43,76 @@ use time::precise_time_s;
|
||||||
|
|
||||||
pub struct IOCompositor {
|
pub struct IOCompositor {
|
||||||
/// The application window.
|
/// The application window.
|
||||||
pub window: Rc<Window>,
|
window: Rc<Window>,
|
||||||
|
|
||||||
/// The port on which we receive messages.
|
/// The port on which we receive messages.
|
||||||
pub port: Receiver<Msg>,
|
port: Receiver<Msg>,
|
||||||
|
|
||||||
/// The render context.
|
/// The render context.
|
||||||
pub context: RenderContext,
|
context: RenderContext,
|
||||||
|
|
||||||
/// The root ContainerLayer.
|
/// The root ContainerLayer.
|
||||||
pub root_layer: Rc<ContainerLayer>,
|
root_layer: Rc<ContainerLayer>,
|
||||||
|
|
||||||
/// The root pipeline.
|
/// The root pipeline.
|
||||||
pub root_pipeline: Option<CompositionPipeline>,
|
root_pipeline: Option<CompositionPipeline>,
|
||||||
|
|
||||||
/// The canvas to paint a page.
|
/// The canvas to paint a page.
|
||||||
pub scene: Scene,
|
scene: Scene,
|
||||||
|
|
||||||
/// The application window size.
|
/// The application window size.
|
||||||
pub window_size: Size2D<uint>,
|
window_size: Size2D<uint>,
|
||||||
|
|
||||||
/// The platform-specific graphics context.
|
/// The platform-specific graphics context.
|
||||||
pub graphics_context: NativeCompositingGraphicsContext,
|
graphics_context: NativeCompositingGraphicsContext,
|
||||||
|
|
||||||
/// Tracks whether the renderer has finished its first rendering
|
/// Tracks whether the renderer has finished its first rendering
|
||||||
pub composite_ready: bool,
|
composite_ready: bool,
|
||||||
|
|
||||||
/// Tracks whether we are in the process of shutting down.
|
/// Tracks whether we are in the process of shutting down.
|
||||||
pub shutting_down: bool,
|
shutting_down: bool,
|
||||||
|
|
||||||
/// Tracks whether we should close compositor.
|
/// Tracks whether we should close compositor.
|
||||||
pub done: bool,
|
done: bool,
|
||||||
|
|
||||||
/// Tracks whether we need to re-composite a page.
|
/// Tracks whether we need to re-composite a page.
|
||||||
pub recomposite: bool,
|
recomposite: bool,
|
||||||
|
|
||||||
/// Keeps track of the current zoom factor.
|
/// Keeps track of the current zoom factor.
|
||||||
pub world_zoom: f32,
|
world_zoom: f32,
|
||||||
|
|
||||||
/// Tracks whether the zoom action has happend recently.
|
/// Tracks whether the zoom action has happend recently.
|
||||||
pub zoom_action: bool,
|
zoom_action: bool,
|
||||||
|
|
||||||
/// The time of the last zoom action has started.
|
/// The time of the last zoom action has started.
|
||||||
pub zoom_time: f64,
|
zoom_time: f64,
|
||||||
|
|
||||||
/// Current display/reflow status of the page
|
/// Current display/reflow status of the page
|
||||||
pub ready_state: ReadyState,
|
ready_state: ReadyState,
|
||||||
|
|
||||||
/// Whether the page being rendered has loaded completely.
|
/// Whether the page being rendered has loaded completely.
|
||||||
/// Differs from ReadyState because we can finish loading (ready)
|
/// Differs from ReadyState because we can finish loading (ready)
|
||||||
/// many times for a single page.
|
/// many times for a single page.
|
||||||
pub load_complete: bool,
|
load_complete: bool,
|
||||||
|
|
||||||
/// The command line option flags.
|
/// The command line option flags.
|
||||||
pub opts: Opts,
|
opts: Opts,
|
||||||
|
|
||||||
/// The root CompositorLayer
|
/// The root CompositorLayer
|
||||||
pub compositor_layer: Option<CompositorLayer>,
|
compositor_layer: Option<CompositorLayer>,
|
||||||
|
|
||||||
/// The channel on which messages can be sent to the constellation.
|
/// The channel on which messages can be sent to the constellation.
|
||||||
pub constellation_chan: ConstellationChan,
|
constellation_chan: ConstellationChan,
|
||||||
|
|
||||||
/// The channel on which messages can be sent to the profiler.
|
/// The channel on which messages can be sent to the profiler.
|
||||||
pub profiler_chan: ProfilerChan,
|
profiler_chan: ProfilerChan,
|
||||||
|
|
||||||
/// Pending scroll to fragment event, if any
|
/// Pending scroll to fragment event, if any
|
||||||
pub fragment_point: Option<Point2D<f32>>
|
fragment_point: Option<Point2D<f32>>
|
||||||
}
|
}
|
||||||
|
|
||||||
impl IOCompositor {
|
impl IOCompositor {
|
||||||
pub fn new(app: &Application,
|
fn new(app: &Application,
|
||||||
opts: Opts,
|
opts: Opts,
|
||||||
port: Receiver<Msg>,
|
port: Receiver<Msg>,
|
||||||
constellation_chan: ConstellationChan,
|
constellation_chan: ConstellationChan,
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue