Struct webrender_traits::WebRenderScriptApi
source · pub struct WebRenderScriptApi(pub(crate) IpcSender<ScriptToCompositorMsg>);
Expand description
A mechanism to send messages from ScriptThread to the parent process’ WebRender instance.
Tuple Fields§
§0: IpcSender<ScriptToCompositorMsg>
Implementations§
source§impl WebRenderScriptApi
impl WebRenderScriptApi
sourcepub fn new(sender: IpcSender<ScriptToCompositorMsg>) -> Self
pub fn new(sender: IpcSender<ScriptToCompositorMsg>) -> Self
Create a new WebrenderIpcSender object that wraps the provided channel sender.
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.
sourcepub fn update_images(&self, updates: Vec<ImageUpdate>)
pub fn update_images(&self, updates: Vec<ImageUpdate>)
Perform a resource update operation.
pub fn remove_unused_font_resources( &self, keys: Vec<FontKey>, instance_keys: Vec<FontInstanceKey>, )
Trait Implementations§
source§impl Clone for WebRenderScriptApi
impl Clone for WebRenderScriptApi
source§fn clone(&self) -> WebRenderScriptApi
fn clone(&self) -> WebRenderScriptApi
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 WebRenderScriptApi
impl<'de> Deserialize<'de> for WebRenderScriptApi
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 WebRenderScriptApi
impl !RefUnwindSafe for WebRenderScriptApi
impl Send for WebRenderScriptApi
impl !Sync for WebRenderScriptApi
impl Unpin for WebRenderScriptApi
impl UnwindSafe for WebRenderScriptApi
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