A GPU based renderer for the web.
It serves as an experimental render backend for Servo, but it can also be used as such in a standalone application.
WebRender currently depends on FreeType
The main entry point to WebRender is the
RenderApi instance, which is responsible for managing resources
and documents. A worker thread is used internally to untie the workload from the application
thread and therefore be able to make better use of multicore systems.
What is referred to as a
frame, is the current geometry on the screen.
A new Frame is created by calling
RenderApi. When the geometry is processed, the application will be
informed via a
RenderNotifier, a callback which you pass to
More information about stacking contexts.
set_display_list() also needs to be supplied with
BuiltDisplayLists. These are obtained by finalizing a
DisplayListBuilder. These are used to draw your geometry. But it
doesn't only contain trivial geometry, it can also store another
StackingContext, as they're nestable.
A handle to a screenshot that is being asynchronously captured and scaled.
Flags to enable/disable various builtin debugging tools.
A globally, unique identifier
An arbitrary identifier for a native (OS compositor) surface
Information about a bound surface that the native compositor returns to WR.
A handle to a recorded frame that was captured.
Return type from render(), which contains some repr(C) statistics as well as some non-repr(C) data.
The renderer is responsible for submitting to the GPU the work prepared by the RenderBackend.
Some basic statistics about the rendered scene, used in Gecko, as well as in wrench reftests to ensure that tests are batching and/or allocating on render targets as we expect them to.
Flags that control how shaders are pre-cached, if at all.
A minimal subset of TileCacheInstance for debug capturing
Uniquely describes the content of this tile, in a way that can be (reasonably) efficiently hashed and compared.
A stable ID for a given tile, to help debugging. These are also used as unique identifiers for tile surfaces when using a native compositor.
A node in the dirty rect tracking quadtree.
A minimal subset of Tile for debug capturing
Optional extra information returned by is_same when logging is enabled.
Debugging information about why a tile was invalidated
The result of a primitive dependency comparison. Size is a u8 since this is a hot path in the code, and keeping the data small is a performance win.
A more detailed version of PrimitiveCompareResult used when debug logging is enabled.
Details for a node in a quadtree that tracks dirty rects for a tile.
Method of uploading texel data from CPU to GPU.
Allows callers to hook into the main render_backend loop and provide additional frame ops for generate_frame transactions. These functions are all called from the render backend thread.
Defines the interface for hooking up an external profiler to WR.
The interfaces that an application can implement to handle ProgramCache update
Allows callers to hook in at certain points of the async scene build. These functions are all called from the scene builder thread.
Creates heap-allocated strings for both vertex and fragment shaders. Public to be accessible to tests.
Set the profiler callbacks, or None to disable the profiler. This function must only ever be called before any WR instances have been created, or the hooks will not be set.