pub struct ServoRenderer {
pub(crate) pipeline_to_webview_map: HashMap<PipelineId, WebViewId>,
shutdown_state: Rc<Cell<ShutdownState>>,
compositor_receiver: IpcReceiver<CompositorMsg>,
pub(crate) constellation_sender: Sender<EmbedderToConstellationMessage>,
time_profiler_chan: ProfilerChan,
pub(crate) webrender_api: RenderApi,
pub(crate) webrender_document: DocumentId,
webrender_gl: Rc<dyn Gl>,
webxr_main_thread: MainThreadRegistry,
pub(crate) convert_mouse_to_touch: bool,
cursor: Cursor,
cursor_pos: DevicePoint,
}
Expand description
Data that is shared by all WebView renderers.
Fields§
§pipeline_to_webview_map: HashMap<PipelineId, WebViewId>
This is a temporary map between PipelineId
s and their associated WebViewId
. Once
all renderer operations become per-WebView
this map can be removed, but we still sometimes
need to work backwards to figure out what WebView
is associated with a Pipeline
.
shutdown_state: Rc<Cell<ShutdownState>>
Tracks whether we are in the process of shutting down, or have shut down and should close
the compositor. This is shared with the Servo
instance.
compositor_receiver: IpcReceiver<CompositorMsg>
The port on which we receive messages.
constellation_sender: Sender<EmbedderToConstellationMessage>
The channel on which messages can be sent to the constellation.
time_profiler_chan: ProfilerChan
The channel on which messages can be sent to the time profiler.
webrender_api: RenderApi
The WebRender RenderApi
interface used to communicate with WebRender.
webrender_document: DocumentId
The active webrender document.
webrender_gl: Rc<dyn Gl>
The GL bindings for webrender
webxr_main_thread: MainThreadRegistry
Some XR devices want to run on the main thread.
convert_mouse_to_touch: bool
True to translate mouse input into touch events.
cursor: Cursor
Current mouse cursor.
cursor_pos: DevicePoint
Current cursor position.
Implementations§
Source§impl ServoRenderer
impl ServoRenderer
pub fn shutdown_state(&self) -> ShutdownState
pub(crate) fn hit_test_at_point<'a>( &self, point: DevicePoint, details_for_pipeline: impl Fn(PipelineId) -> Option<&'a PipelineDetails>, ) -> Option<CompositorHitTestResult>
pub(crate) fn hit_test_at_point_with_flags_and_pipeline<'a>( &self, point: DevicePoint, flags: HitTestFlags, pipeline_id: Option<WebRenderPipelineId>, details_for_pipeline: impl Fn(PipelineId) -> Option<&'a PipelineDetails>, ) -> Vec<CompositorHitTestResult>
pub(crate) fn send_transaction(&mut self, transaction: Transaction)
pub(crate) fn update_cursor( &mut self, pos: DevicePoint, result: &CompositorHitTestResult, )
Auto Trait Implementations§
impl !Freeze for ServoRenderer
impl !RefUnwindSafe for ServoRenderer
impl !Send for ServoRenderer
impl !Sync for ServoRenderer
impl Unpin for ServoRenderer
impl !UnwindSafe for ServoRenderer
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