Struct webrender_api::Transaction [] [src]

pub struct Transaction { /* fields omitted */ }

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

This mechanism ensures that: - no other message can be interleaved between two commands that need to be applied together. - no redundant work is performed if two commands in the same transaction cause the scene or the frame to be rebuilt.

Methods

impl Transaction
[src]

[src]

[src]

[src]

[src]

Sets the root pipeline.

Examples

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

[src]

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.

[src]

Supplies a new frame to WebRender.

Non-blocking, it notifies a worker process which processes the display list. When it's done and a RenderNotifier has been set in webrender::Renderer, new_frame_ready() gets called.

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.
  • resources: A set of resource updates that must be applied at the same time as the display list.

[src]

[src]

[src]

Scrolls the scrolling layer under the cursor

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

[src]

[src]

[src]

[src]

[src]

[src]

Generate a new frame.

[src]

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