Crate webrender_api

source ·
Expand description

The webrender_api crate contains an assortment types and functions used by WebRender consumers as well as, in many cases, WebRender itself.

This separation allows Servo to parallelize compilation across webrender and other crates that depend on webrender_api. So in practice, we put things in this crate when Servo needs to use them. Firefox depends on the webrender crate directly, and so this distinction is not really relevant there.

Re-exports§

Modules§

Structs§

Enums§

Constants§

Traits§

  • An object that can perform hit-testing without doing synchronous queries to the RenderBackendThread.
  • A group of rasterization requests to execute synchronously on the scene builder thread.
  • A handler on the render backend that can create rasterizer objects which will be sent to the scene builder thread to execute the rasterization.
  • The resources exposed by the resource cache available for use by the blob rasterizer.
  • Handler to expose support for annotating crash reports.
  • The interfaces that an application can implement to support providing external image buffers. When the application passes an external image to WR, it should keep that external image life time. People could check the epoch id in RenderNotifier at the client side to make sure that the external image is not used by WR. Then, do the clean up for that external image.
  • A handler to notify when a transaction reaches certain stages of the rendering pipeline.
  • A handler to integrate WebRender with the thread that contains the Renderer.

Type Aliases§

  • Backing store for blob image command streams.
  • Result type for blob raserization.
  • An identifier used to refer to previously sent display items. Currently it refers to individual display items, but this may change later.
  • A tag that can be used to identify items during hit testing. If the tag is missing then the item doesn’t take part in hit testing at all. This is composed of two numbers. In Servo, the first is an identifier while the second is used to select the cursor that should be used during mouse movement. In Gecko, the first is a scrollframe identifier, while the second is used to store various flags that APZ needs to properly process input events.
  • This type carries no valuable semantics for WR. However, it reflects the fact that clients (Servo) may generate pipelines by different semi-independent sources. These pipelines still belong to the same IdNamespace and the same DocumentId. Having this extra Id field enables them to generate PipelineId without collision.
  • Width and height in device pixels of image tiles.
  • A C function that takes a pointer to a heap allocation and returns its size.