pub struct CrossProcessCompositorApi(pub IpcSender<CrossProcessCompositorMessage>);
Expand description
A mechanism to send messages from ScriptThread to the parent process’ WebRender instance.
Tuple Fields§
§0: IpcSender<CrossProcessCompositorMessage>
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<CrossProcessCompositorMessage>
pub fn sender(&self) -> &IpcSender<CrossProcessCompositorMessage>
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,
pipeline_id: WebRenderPipelineId,
point: LayoutPoint,
scroll_id: ExternalScrollId,
)
pub fn send_scroll_node( &self, pipeline_id: WebRenderPipelineId, point: LayoutPoint, scroll_id: ExternalScrollId, )
Perform a scroll operation.
sourcepub fn send_display_list(
&self,
display_list_info: CompositorDisplayListInfo,
list: BuiltDisplayList,
)
pub fn send_display_list( &self, 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(&self) -> Option<ImageKey>
pub fn generate_image_key(&self) -> Option<ImageKey>
Create a new image key. Blocks until the key is available.
pub fn add_image( &self, key: ImageKey, descriptor: ImageDescriptor, data: SerializableImageData, )
sourcepub fn update_images(&self, updates: Vec<ImageUpdate>)
pub fn update_images(&self, updates: Vec<ImageUpdate>)
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
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
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>,
Deserialize this value from the given Serde deserializer. Read more
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
Mutably borrows from an owned value. Read more
source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)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>
Converts
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>
Converts
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 moresource§impl<T> MaybeBoxed<Box<T>> for T
impl<T> MaybeBoxed<Box<T>> for T
source§fn maybe_boxed(self) -> Box<T>
fn maybe_boxed(self) -> Box<T>
Convert
source§impl<T> MaybeBoxed<T> for T
impl<T> MaybeBoxed<T> for T
source§fn maybe_boxed(self) -> T
fn maybe_boxed(self) -> T
Convert