Struct webrender_api::RenderApi [] [src]

pub struct RenderApi {
    api_sender: MsgSender<ApiMsg>,
    payload_sender: PayloadSender,
    namespace_id: IdNamespace,
    next_id: Cell<ResourceId>,
}

Fields

Methods

impl RenderApi
[src]

[src]

[src]

[src]

[src]

[src]

[src]

[src]

Gets the dimensions for the supplied glyph keys

Note: Internally, the internal texture cache doesn't store 'empty' textures (height or width = 0) This means that glyph dimensions e.g. for spaces (' ') will mostly be None.

[src]

Gets the glyph indices for the supplied string. These can be used to construct GlyphKeys.

[src]

Creates an ImageKey.

[src]

Add/remove/update resources such as images and fonts.

[src]

Add/remove/update resources such as images and fonts.

This is similar to update_resources with the addition that it allows updating a pipeline's epoch.

[src]

[src]

[src]

[src]

Create a new unique key that can be used for animated property bindings.

[src]

[src]

[src]

[src]

A helper method to send document messages.

[src]

Sets the root pipeline.

Examples

let api = sender.create_api();
let document_id = api.add_document(DeviceUintSize::zero());
let pipeline_id = PipelineId(0, 0);
api.set_root_pipeline(document_id, 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]

Scrolls the scrolling layer under the cursor

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

[src]

[src]

Does a hit test as the given point

[src]

[src]

[src]

[src]

[src]

[src]

[src]

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

[src]

Generate a new frame. Optionally, supply a list of animated property bindings that should be used to resolve bindings in the current display list.

Trait Implementations

impl Drop for RenderApi
[src]

[src]

Executes the destructor for this type. Read more