pub struct CrossProcessCompositorApi(pub IpcSender<CompositorMsg>);
Expand description
A mechanism to send messages from ScriptThread to the parent process’ WebRender instance.
Tuple Fields§
§0: IpcSender<CompositorMsg>
Implementations§
Source§impl CrossProcessCompositorApi
impl CrossProcessCompositorApi
Sourcepub fn dummy() -> Self
pub fn dummy() -> Self
Create a new CrossProcessCompositorApi
struct that does not have a listener on the other
end to use for unit testing.
Sourcepub fn sender(&self) -> &IpcSender<CompositorMsg>
pub fn sender(&self) -> &IpcSender<CompositorMsg>
Get the sender for this proxy.
Sourcepub fn send_initial_transaction(&self, pipeline: WebRenderPipelineId)
pub fn send_initial_transaction(&self, pipeline: WebRenderPipelineId)
Inform WebRender of the existence of this pipeline.
Sourcepub fn send_scroll_node(
&self,
webview_id: WebViewId,
pipeline_id: WebRenderPipelineId,
point: LayoutVector2D,
scroll_id: ExternalScrollId,
)
pub fn send_scroll_node( &self, webview_id: WebViewId, pipeline_id: WebRenderPipelineId, point: LayoutVector2D, scroll_id: ExternalScrollId, )
Perform a scroll operation.
Sourcepub fn send_display_list(
&self,
webview_id: WebViewId,
display_list_info: &CompositorDisplayListInfo,
list: BuiltDisplayList,
)
pub fn send_display_list( &self, webview_id: WebViewId, display_list_info: &CompositorDisplayListInfo, list: BuiltDisplayList, )
Inform WebRender of a new display list for the given pipeline.
Sourcepub fn hit_test(
&self,
pipeline: Option<WebRenderPipelineId>,
point: DevicePoint,
flags: HitTestFlags,
) -> Vec<CompositorHitTestResult>
pub fn hit_test( &self, pipeline: Option<WebRenderPipelineId>, point: DevicePoint, flags: HitTestFlags, ) -> Vec<CompositorHitTestResult>
Perform a hit test operation. Blocks until the operation is complete and and a result is available.
Sourcepub fn generate_image_key_blocking(&self) -> Option<ImageKey>
pub fn generate_image_key_blocking(&self) -> Option<ImageKey>
Create a new image key. Blocks until the key is available.
Sourcepub fn generate_image_key_async(&self, pipeline_id: PipelineId)
pub fn generate_image_key_async(&self, pipeline_id: PipelineId)
Sends a message to the compositor for creating new image keys. The compositor will then send a batch of keys over the constellation to the script_thread and the appropriate pipeline.
pub fn add_image( &self, key: ImageKey, descriptor: ImageDescriptor, data: SerializableImageData, )
pub fn update_image( &self, key: ImageKey, descriptor: ImageDescriptor, data: SerializableImageData, )
pub fn delete_image(&self, key: ImageKey)
Sourcepub fn update_images(&self, updates: SmallVec<[ImageUpdate; 1]>)
pub fn update_images(&self, updates: SmallVec<[ImageUpdate; 1]>)
Perform an image resource update operation.
pub fn remove_unused_font_resources( &self, keys: Vec<FontKey>, instance_keys: Vec<FontInstanceKey>, )
pub fn add_font_instance( &self, font_instance_key: FontInstanceKey, font_key: FontKey, size: f32, flags: FontInstanceFlags, )
pub fn add_font( &self, font_key: FontKey, data: Arc<IpcSharedMemory>, index: u32, )
pub fn add_system_font(&self, font_key: FontKey, handle: NativeFontHandle)
pub fn fetch_font_keys( &self, number_of_font_keys: usize, number_of_font_instance_keys: usize, ) -> (Vec<FontKey>, Vec<FontInstanceKey>)
Trait Implementations§
Source§impl Clone for CrossProcessCompositorApi
impl Clone for CrossProcessCompositorApi
Source§fn clone(&self) -> CrossProcessCompositorApi
fn clone(&self) -> CrossProcessCompositorApi
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moreSource§impl<'de> Deserialize<'de> for CrossProcessCompositorApi
impl<'de> Deserialize<'de> for CrossProcessCompositorApi
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Source§impl MallocSizeOf for CrossProcessCompositorApi
impl MallocSizeOf for CrossProcessCompositorApi
Source§fn size_of(&self, ops: &mut MallocSizeOfOps) -> usize
fn size_of(&self, ops: &mut MallocSizeOfOps) -> usize
Auto Trait Implementations§
impl Freeze for CrossProcessCompositorApi
impl !RefUnwindSafe for CrossProcessCompositorApi
impl Send for CrossProcessCompositorApi
impl !Sync for CrossProcessCompositorApi
impl Unpin for CrossProcessCompositorApi
impl UnwindSafe for CrossProcessCompositorApi
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> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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