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

source

pub fn new(sender: IpcSender<ScriptToCompositorMsg>) -> Self

Create a new WebrenderIpcSender object that wraps the provided channel sender.

source

pub fn send_initial_transaction(&self, pipeline: WebRenderPipelineId)

Inform WebRender of the existence of this pipeline.

source

pub fn send_scroll_node( &self, pipeline_id: WebRenderPipelineId, point: LayoutPoint, scroll_id: ExternalScrollId, )

Perform a scroll operation.

source

pub fn send_display_list( &self, display_list_info: CompositorDisplayListInfo, list: BuiltDisplayList, )

Inform WebRender of a new display list for the given pipeline.

source

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.

source

pub fn generate_image_key(&self) -> Option<ImageKey>

Create a new image key. Blocks until the key is available.

source

pub fn update_images(&self, updates: Vec<ImageUpdate>)

Perform a resource update operation.

source

pub fn remove_unused_font_resources( &self, keys: Vec<FontKey>, instance_keys: Vec<FontInstanceKey>, )

Trait Implementations§

source§

impl Clone for WebRenderScriptApi

source§

fn clone(&self) -> WebRenderScriptApi

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl<'de> Deserialize<'de> for WebRenderScriptApi

source§

fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>
where __D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
source§

impl Serialize for WebRenderScriptApi

source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where __S: Serializer,

Serialize this value into the given Serde serializer. Read more

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T, U> Into<U> for T
where U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

source§

impl<T> Same for T

§

type Output = T

Should always be Self
source§

impl<T> ToOwned for T
where T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
source§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

source§

fn vzip(self) -> V

source§

impl<T> DeserializeOwned for T
where T: for<'de> Deserialize<'de>,

source§

impl<T> ErasedDestructor for T
where T: 'static,

source§

impl<T> MaybeSendSync for T