mirror of
https://github.com/servo/servo.git
synced 2025-08-03 12:40:06 +01:00
Auto merge of #8898 - vwvww:compositor_msg_refactor, r=Ms2ger
Moved CompositorMsg enum into compositing crate. moved CompositorMsg enum into compositing crate. moved from components/msg/constellation_msg.rs to components/compositing/lib.rs fixes #8832 <!-- Reviewable:start --> [<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/8898) <!-- Reviewable:end -->
This commit is contained in:
commit
4e73a30b00
11 changed files with 47 additions and 35 deletions
|
@ -53,6 +53,14 @@ extern crate util;
|
|||
|
||||
pub use compositor_task::{CompositorEventListener, CompositorProxy, CompositorTask};
|
||||
pub use constellation::Constellation;
|
||||
use euclid::size::{Size2D};
|
||||
use ipc_channel::ipc::{IpcSender};
|
||||
use msg::compositor_msg::Epoch;
|
||||
use msg::constellation_msg::{FrameId, Key, KeyState, KeyModifiers, LoadData};
|
||||
use msg::constellation_msg::{NavigationDirection, PipelineId, SubpageId};
|
||||
use msg::constellation_msg::{WebDriverCommandMsg, WindowSizeData};
|
||||
use std::collections::HashMap;
|
||||
use url::Url;
|
||||
|
||||
mod compositor;
|
||||
mod compositor_layer;
|
||||
|
@ -65,3 +73,30 @@ mod scrolling;
|
|||
mod surface_map;
|
||||
mod timer_scheduler;
|
||||
pub mod windowing;
|
||||
|
||||
/// Messages from the compositor to the constellation.
|
||||
#[derive(Deserialize, Serialize)]
|
||||
pub enum CompositorMsg {
|
||||
Exit,
|
||||
FrameSize(PipelineId, Size2D<f32>),
|
||||
/// Request that the constellation send the FrameId corresponding to the document
|
||||
/// with the provided pipeline id
|
||||
GetFrame(PipelineId, IpcSender<Option<FrameId>>),
|
||||
/// Request that the constellation send the current pipeline id for the provided frame
|
||||
/// id, or for the root frame if this is None, over a provided channel
|
||||
GetPipeline(Option<FrameId>, IpcSender<Option<PipelineId>>),
|
||||
/// Requests that the constellation inform the compositor of the title of the pipeline
|
||||
/// immediately.
|
||||
GetPipelineTitle(PipelineId),
|
||||
InitLoadUrl(Url),
|
||||
/// Query the constellation to see if the current compositor output is stable
|
||||
IsReadyToSaveImage(HashMap<PipelineId, Epoch>),
|
||||
KeyEvent(Key, KeyState, KeyModifiers),
|
||||
LoadUrl(PipelineId, LoadData),
|
||||
Navigate(Option<(PipelineId, SubpageId)>, NavigationDirection),
|
||||
ResizedWindow(WindowSizeData),
|
||||
/// Requests that the constellation instruct layout to begin a new tick of the animation.
|
||||
TickAnimation(PipelineId),
|
||||
/// Dispatch a webdriver command
|
||||
WebDriverCommand(WebDriverCommandMsg),
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue