Struct constellation::pipeline::Pipeline
source · pub struct Pipeline {Show 15 fields
pub id: PipelineId,
pub browsing_context_id: BrowsingContextId,
pub top_level_browsing_context_id: TopLevelBrowsingContextId,
pub opener: Option<BrowsingContextId>,
pub event_loop: Rc<EventLoop>,
pub compositor_proxy: CompositorProxy,
pub url: ServoUrl,
pub animation_state: AnimationState,
pub children: Vec<BrowsingContextId>,
pub load_data: LoadData,
pub history_state_id: Option<HistoryStateId>,
pub history_states: HashSet<HistoryStateId>,
pub completely_loaded: bool,
pub title: String,
pub layout_epoch: Epoch,
}
Expand description
A Pipeline
is the constellation’s view of a Window
. Each pipeline has an event loop
(executed by a script thread). A script thread may be responsible for many pipelines.
Fields§
§id: PipelineId
The ID of the pipeline.
browsing_context_id: BrowsingContextId
The ID of the browsing context that contains this Pipeline.
top_level_browsing_context_id: TopLevelBrowsingContextId
The ID of the top-level browsing context that contains this Pipeline.
opener: Option<BrowsingContextId>
§event_loop: Rc<EventLoop>
The event loop handling this pipeline.
compositor_proxy: CompositorProxy
A channel to the compositor.
url: ServoUrl
The most recently loaded URL in this pipeline. Note that this URL can change, for example if the page navigates to a hash URL.
animation_state: AnimationState
Whether this pipeline is currently running animations. Pipelines that are running animations cause composites to be continually scheduled.
children: Vec<BrowsingContextId>
The child browsing contexts of this pipeline (these are iframes in the document).
load_data: LoadData
The Load Data used to create this pipeline.
history_state_id: Option<HistoryStateId>
The active history state for this pipeline.
history_states: HashSet<HistoryStateId>
The history states owned by this pipeline.
completely_loaded: bool
Has this pipeline received a notification that it is completely loaded?
title: String
The title of this pipeline’s document.
layout_epoch: Epoch
The last compositor Epoch
that was laid out in this pipeline if “exit after load” is
enabled.
Implementations§
source§impl Pipeline
impl Pipeline
sourcepub fn spawn<STF: ScriptThreadFactory>(
state: InitialPipelineState,
) -> Result<NewPipeline, Error>
pub fn spawn<STF: ScriptThreadFactory>( state: InitialPipelineState, ) -> Result<NewPipeline, Error>
Possibly starts a script thread, in a new process if requested.
sourcepub fn new(
id: PipelineId,
browsing_context_id: BrowsingContextId,
top_level_browsing_context_id: TopLevelBrowsingContextId,
opener: Option<BrowsingContextId>,
event_loop: Rc<EventLoop>,
compositor_proxy: CompositorProxy,
throttled: bool,
load_data: LoadData,
) -> Pipeline
pub fn new( id: PipelineId, browsing_context_id: BrowsingContextId, top_level_browsing_context_id: TopLevelBrowsingContextId, opener: Option<BrowsingContextId>, event_loop: Rc<EventLoop>, compositor_proxy: CompositorProxy, throttled: bool, load_data: LoadData, ) -> Pipeline
Creates a new Pipeline
, after the script has been spawned.
sourcepub fn exit(&self, discard_bc: DiscardBrowsingContext)
pub fn exit(&self, discard_bc: DiscardBrowsingContext)
A normal exit of the pipeline, which waits for the compositor, and delegates layout shutdown to the script thread.
sourcepub fn force_exit(&self, discard_bc: DiscardBrowsingContext)
pub fn force_exit(&self, discard_bc: DiscardBrowsingContext)
A forced exit of the shutdown, which does not wait for the compositor, or for the script thread to shut down layout.
sourcepub fn set_activity(&self, activity: DocumentActivity)
pub fn set_activity(&self, activity: DocumentActivity)
Notify this pipeline of its activity.
sourcepub fn to_sendable(&self) -> CompositionPipeline
pub fn to_sendable(&self) -> CompositionPipeline
The compositor’s view of a pipeline.
sourcepub fn add_child(&mut self, browsing_context_id: BrowsingContextId)
pub fn add_child(&mut self, browsing_context_id: BrowsingContextId)
Add a new child browsing context.
sourcepub fn remove_child(&mut self, browsing_context_id: BrowsingContextId)
pub fn remove_child(&mut self, browsing_context_id: BrowsingContextId)
Remove a child browsing context.
sourcepub fn set_throttled(&self, throttled: bool)
pub fn set_throttled(&self, throttled: bool)
Set whether to make pipeline use less resources, by stopping animations and running timers at a heavily limited rate.
Auto Trait Implementations§
impl Freeze for Pipeline
impl !RefUnwindSafe for Pipeline
impl !Send for Pipeline
impl !Sync for Pipeline
impl Unpin for Pipeline
impl !UnwindSafe for Pipeline
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
source§impl<T> Instrument for T
impl<T> Instrument for T
source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
source§impl<T> IntoEither for T
impl<T> IntoEither for T
source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moresource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more