pub(crate) enum ScreenshotRequestPhase {
ConstellationRequest,
WaitingOnPipelineDisplayLists(Rc<FxHashMap<PipelineId, Epoch>>),
WaitingOnFrame,
}
Expand description
Screenshots requests happen in three phases:
Variants§
ConstellationRequest
A request is sent to the Constellation, asking each Pipeline in a WebView, to report the display list epoch to render for the screenshot. Each Pipeline will wait to send an epoch that happens after the Pipeline is ready in a variety of ways:
- The
load
event has fired. - All render blocking elements are no longer blocking the rendering.
- All images are loaded and displayed.
- All web fonts are loaded.
- The
reftest-wait
andtest-wait
classes have been removed from the root element. - The rendering is up-to-date
When all Pipelines have reported this epoch to the Constellation it sends a ScreenshotReadinessResponse back to the renderer.
WaitingOnPipelineDisplayLists(Rc<FxHashMap<PipelineId, Epoch>>)
The renderer has received the ScreenshotReadinessReponse from the Constellation and is now waiting for all display lists to be received from the Pipelines and sent to WebRender.
WaitingOnFrame
Once the renderer has received all of the Pipeline display lists necessary to take
the screenshot and uploaded them to WebRender, it waits for an appropriate frame to
be ready. Currently this just waits for the [FrameDelayer
] to stop delaying frames
and for there to be no pending WebRender frames (ones sent to WebRender that are not
ready yet). Once that happens, and a potential extra repaint is triggered, the renderer
will take the screenshot and fufill the request.
Trait Implementations§
Source§impl PartialEq for ScreenshotRequestPhase
impl PartialEq for ScreenshotRequestPhase
impl StructuralPartialEq for ScreenshotRequestPhase
Auto Trait Implementations§
impl Freeze for ScreenshotRequestPhase
impl RefUnwindSafe for ScreenshotRequestPhase
impl !Send for ScreenshotRequestPhase
impl !Sync for ScreenshotRequestPhase
impl Unpin for ScreenshotRequestPhase
impl UnwindSafe for ScreenshotRequestPhase
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