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§
pub extern crate crossbeam_channel;
pub extern crate euclid;
Modules§
Structs§
- AuxIter
- Backdrop
Filter Display Item - Renders a filtered region of its backdrop
- Base
Font Instance - Immutable description of a font instance requested by the user of the API.
- Blend
Primitive - Blob
Image Descriptor - Metadata (but not storage) for a blob image.
- Blob
Image Key - An opaque identifier describing a blob image registered with WebRender. This is used as a handle to reference blob images, and can be used as an image in display items.
- Blob
Image Params - Input parameters for the BlobImageRasterizer.
- Blob
Image Request - A key identifying blob image rasterization work requested from the blob image rasterizer.
- Blur
Primitive - Border
Display Item - Border
Radius - Border
Side - BoxShadow
Display Item - Built
Display List - A display list.
- Built
Display List Descriptor - Describes the memory layout of a display list.
- Built
Display List Iter - Clear
Rectangle Display Item - Clears all colors from the area, making it possible to cut holes in the window. (useful for things like the macos frosted-glass effect).
- Clip
Chain Id - Clip
Chain Item - Just an abstraction for bundling up a bunch of clips into a “super clip”.
- Clip
Display Item - ColorF
- Represents RGBA screen colors with floating point numbers.
- Color
Matrix Primitive - cbindgen:derive-eq=false
- ColorU
- Represents RGBA screen colors with one byte per channel.
- Common
Item Properties - A grouping of fields a lot of display items need, just to avoid repeating these over and over in this file.
- Complex
Clip Region - Component
Transfer Primitive - Composite
Primitive - Conic
Gradient - Conic
Gradient Display Item - Crash
Annotator Guard - Guard to add a crash annotation at creation, and clear it at destruction.
- Debug
Flags - Flags to enable/disable various builtin debugging tools.
- Display
Item Cache - Display
Item Ref - Display
List Builder - Display
List With Cache - Document
Id - A key uniquely identifying a WebRender document.
- Drop
Shadow Primitive - Dynamic
Properties - When using
generate_frame()
, a list ofPropertyValue
structures can optionally be supplied to provide the current value of any animated properties. - Epoch
- An epoch identifies the state of a pipeline in time.
- External
Event - An opaque pointer-sized value.
- External
Image - The data that an external client should provide about an external image. For instance, if providing video frames, the application could call wr.render() whenever a new video frame is ready. Note that the UV coords are supplied in texel-space!
- External
Image Data - Descriptor for external image resources. See
ImageData
. - External
Image Id - An arbitrary identifier for an external image provided by the application. It must be a unique identifier for each external image.
- External
Scroll Id - An external identifier that uniquely identifies a scroll frame independent of its ClipId, which may change from frame to frame. This should be unique within a pipeline. WebRender makes no attempt to ensure uniqueness. The zero value is reserved for use by the root scroll node of every pipeline, which always has an external id.
- Filter
Data - Filter
Primitive - SVG Filter Primitive. See: https://github.com/eqrion/cbindgen/issues/9 cbindgen:derive-eq=false
- Flood
Primitive - Font
Instance Data - Data corresponding to an instantiation of a font, with size and other options specified.
- Font
Instance Flags - Font
Instance Key - Font
Instance Options - Font
Instance Platform Options - FontKey
- Font
Size - Hashable floating-point storage for font size.
- Font
Variation - Glyph
Dimension Request - Glyph
Dimensions - Glyph
Index Request - Glyph
Instance - Glyph
Options - Gradient
- Gradient
Builder - Construct a gradient to be used in display lists.
- Gradient
Display Item - The area
- Gradient
Stop - HitTest
Display Item - A minimal hit-testable item for the parent browser’s convenience, and is slimmer than a RectangleDisplayItem (no color). The existence of this as a distinct item also makes it easier to inspect/debug display items.
- HitTest
Item - Describe an item that matched a hit-test query.
- HitTest
Result - Returned by
RenderApi::hit_test
. - HitTester
Request - A hit tester requested to the render backend thread but not necessarily ready yet.
- IdNamespace
- ID namespaces uniquely identify different users of WebRender’s API.
- Identity
Primitive - Iframe
Display Item - Image
Descriptor - Metadata (but not storage) describing an image In WebRender.
- Image
Descriptor Flags - Various flags that are part of an image descriptor.
- Image
Display Item - This describes an image that fills the specified area. It stretches or shrinks the image as necessary. While RepeatingImageDisplayItem could otherwise provide a superset of the functionality, it has been problematic inferring the desired repetition properties when snapping changes the size of the primitive.
- Image
Key - An opaque identifier describing an image registered with WebRender.
This is used as a handle to reference images, and is used as the
hash map key for the actual image storage in the
ResourceCache
. - Image
Mask - Image
Mask Clip Display Item - Item
Range - Item
Stats - Stats for an individual item
- Line
Display Item - Native
Font Handle - Nine
Patch Border - Normal
Border - Notification
Request - A request to notify a handler when the transaction reaches certain stages of the rendering pipeline.
- Offset
Primitive - Opacity
Primitive - Pipeline
Id - From the point of view of WR,
PipelineId
is completely opaque and generic as long as it’s clonable, serializable, comparable, and hashable. - Premultiplied
ColorF - Represents pre-multiplied RGBA colors with floating point numbers.
- Primitive
Flags - Property
Binding Id - A key to identify an animated property binding.
- Property
Binding Key - A unique key that is used for connecting animated property values to bindings in the display list.
- Property
Value - The current value of an animated property. This is supplied by the calling code.
- Push
Shadow Display Item - Push
Stacking Context Display Item - Quality
Settings - Various settings that the caller can select based on desired tradeoffs between rendering quality and performance / power usage.
- Radial
Gradient - Radial
Gradient Display Item - Rasterized
Blob Image - Representation of a rasterized blob image. This is obtained by passing
BlobImageData
to the embedding via the rasterization callback. - Rect
Clip Display Item - Rectangle
Display Item - A solid or an animating color to draw (may not actually be a rectangle due to complex clips)
- Reference
Frame - Reference
Frame Display List Item - Repeating
Image Display Item - This describes a background-image and its tiling. It repeats in a grid to fill the specified area.
- Rounded
Rect Clip Display Item - Save
State - Scroll
Frame Display Item - Scroll
Node State - Shadow
- Shared
Font Instance Map - A map of font instance data accessed concurrently from multiple threads.
- Space
AndClip Info - Per-primitive information about the nodes in the clip tree and the spatial tree that the primitive belongs to.
- Spatial
Id - A reference to a spatial node defining item positioning.
- Stacking
Context - Stacking
Context Flags - Sticky
Frame Display Item - Sticky
Offset Bounds - The minimum and maximum allowable offset for a sticky frame in a single dimension.
- Synthetic
Italics - Temp
Filter Data - Text
Display Item - YuvImage
Display Item
Enums§
- Alpha
Type - Blob
Image Error - Error code for when blob rasterization failed.
- Border
Details - Border
Radius Kind - Border
Style - BoxShadow
Clip Mode - Checkpoint
- A stage of the rendering pipeline.
- ClipId
- A reference to a clipping node defining how an item is clipped.
- Clip
Mode - Color
Depth - Specifies the color depth of an image. Currently only used for YUV images.
- Color
Range - Color
Space - Component
Transfer Func Type - Composite
Operator - Available composite operoations for the composite filter primitive
- Crash
Annotation - Crash annotations included in crash reports.
- Dirty
Rect - The possible states of a Dirty rect.
- Display
Item - Display
List Section - DisplayListSection determines the target buffer for the display items.
- Extend
Mode - External
Image Source - The source for an external image.
- External
Image Type - Storage format identifier for externally-managed images.
- Fill
Rule - Filter
Op - CSS filter.
- Filter
Primitive Input - An input to a SVG filter primitive.
- Filter
Primitive Kind - See: https://github.com/eqrion/cbindgen/issues/9 cbindgen:derive-eq=false
- Font
Render Mode - Font
Template - Container for the raw data describing a font. This might be a stream of bytes corresponding to a downloaded font, or a handle to a native font from the operating system.
- Gecko
Display List Type - Image
Buffer Kind - Specifies the type of texture target in driver terms.
- Image
Data - Represents the backing store of an arbitrary series of pixels for display by WebRender. This storage can take several forms.
- Image
Format - Specifies the format of a series of pixels, in driver terms.
- Image
Rendering - Line
Orientation - Line
Style - MixBlend
Mode - Nine
Patch Border Source - Primitive
KeyKind - Information specific to a primitive type that uniquely identifies a primitive template by key.
- Property
Binding - A binding property can either be a specific value (the normal, non-animated case) or point to a binding location to fetch the current value from. Note that Binding has also a non-animated value, the value is used for the case where the animation is still in-delay phase (i.e. the animation doesn’t produce any animation values).
- Raster
Space - Configure whether the contents of a stacking context should be rasterized in local space or screen space. Local space rasterized pictures are typically used when we want to cache the output, and performance is important. Note that this is a performance hint only, which WR may choose to ignore.
- Reference
Frame Kind - Reference
Transform Binding - Repeat
Mode - Rotation
- Scroll
Clamping - Describe whether or not scrolling should be clamped by the content bounds.
- Scroll
Location - Scroll
Sensitivity - Transform
Style - YuvColor
Space - YuvData
- YuvFormat
- YuvRanged
Color Space
Constants§
- DEFAULT_
TILE_ SIZE - The default tile size for blob images and regular images larger than the maximum texture size.
- MAX_
TEXT_ RUN_ LENGTH - POLYGON_
CLIP_ VERTEX_ MAX
Traits§
- ApiHit
Tester - An object that can perform hit-testing without doing synchronous queries to the RenderBackendThread.
- Async
Blob Image Rasterizer - A group of rasterization requests to execute synchronously on the scene builder thread.
- Blob
Image Handler - A handler on the render backend that can create rasterizer objects which will be sent to the scene builder thread to execute the rasterization.
- Blob
Image Resources - The resources exposed by the resource cache available for use by the blob rasterizer.
- Crash
Annotator - Handler to expose support for annotating crash reports.
- External
Image Handler - 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.
- Notification
Handler - A handler to notify when a transaction reaches certain stages of the rendering pipeline.
- Render
Notifier - A handler to integrate WebRender with the thread that contains the
Renderer
.
Type Aliases§
- Blob
Image Data - Backing store for blob image command streams.
- Blob
Image Result - Result type for blob raserization.
- Font
Instance Map - Glyph
Index - ItemKey
- An identifier used to refer to previously sent display items. Currently it refers to individual display items, but this may change later.
- ItemTag
- 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.
- Pipeline
Source Id - 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 sameDocumentId
. Having this extra Id field enables them to generatePipelineId
without collision. - Tile
Size - Width and height in device pixels of image tiles.
- Void
PtrTo Size Fn - A C function that takes a pointer to a heap allocation and returns its size.