[][src]Struct webrender_api::Transaction

pub struct Transaction {
    pub resource_updates: Vec<ResourceUpdate>,
    // some fields omitted
}

A Transaction is a group of commands to apply atomically to a document.

This mechanism ensures that:

Fields

Methods

impl Transaction
[src]

Sets the root pipeline.

Examples

let pipeline_id = PipelineId(0, 0);
let mut txn = Transaction::new();
txn.set_root_pipeline(pipeline_id);

Removes data associated with a pipeline from the internal data structures. If the specified pipeline_id is for the root pipeline, the root pipeline is reset back to None.

Supplies a new frame to WebRender.

Non-blocking, it notifies a worker process which processes the display list.

Note: Scrolling doesn't require an own Frame.

Arguments:

  • document_id: Target Document ID.
  • epoch: The unique Frame ID, monotonically increasing.
  • background: The background color of this pipeline.
  • viewport_size: The size of the viewport for this frame.
  • pipeline_id: The ID of the pipeline that is supplying this display list.
  • content_size: The total screen space size of this display list's display items.
  • display_list: The root Display list used in this frame.
  • preserve_frame_state: If a previous frame exists which matches this pipeline id, this setting determines if frame state (such as scrolling position) should be preserved for this new display list.

Trigger a notification at a certain stage of the rendering pipeline.

Not that notification requests are skipped during serialization, so is is best to use them for synchronization purposes and not for things that could affect the WebRender's state.

Scrolls the scrolling layer under the cursor

WebRender looks for the layer closest to the user which has ScrollPolicy::Scrollable set.

Generate a new frame. When it's done and a RenderNotifier has been set in webrender::Renderer, new_frame_ready() gets called. Note that the notifier is called even if the frame generation was a no-op; the arguments passed to new_frame_ready will provide information as to when happened.

Supply a list of animated property bindings that should be used to resolve bindings in the current display list.

Add to the list of animated property bindings that should be used to resolve bindings in the current display list. This is a convenience method so the caller doesn't have to figure out all the dynamic properties before setting them on the transaction but can do them incrementally.

Enable copying of the output of this pipeline id to an external texture for callers to consume.

Consumes this object and just returns the frame ops.

Auto Trait Implementations

impl Send for Transaction

impl !Sync for Transaction

Blanket Implementations

impl<T, U> Into for T where
    U: From<T>, 
[src]

Performs the conversion.

impl<T> From for T
[src]

Performs the conversion.

impl<T, U> TryFrom for T where
    T: From<U>, 
[src]

🔬 This is a nightly-only experimental API. (try_from)

The type returned in the event of a conversion error.

🔬 This is a nightly-only experimental API. (try_from)

Performs the conversion.

impl<T> Borrow for T where
    T: ?Sized
[src]

Immutably borrows from an owned value. Read more

impl<T, U> TryInto for T where
    U: TryFrom<T>, 
[src]

🔬 This is a nightly-only experimental API. (try_from)

The type returned in the event of a conversion error.

🔬 This is a nightly-only experimental API. (try_from)

Performs the conversion.

impl<T> BorrowMut for T where
    T: ?Sized
[src]

Mutably borrows from an owned value. Read more

impl<T> Any for T where
    T: 'static + ?Sized
[src]

🔬 This is a nightly-only experimental API. (get_type_id)

this method will likely be replaced by an associated static

Gets the TypeId of self. Read more