Crate webrender [] [src]

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.

External dependencies

WebRender currently depends on FreeType

Api Structure

The main entry point to WebRender is the webrender::renderer::Renderer.

By calling Renderer::new(...) you get a Renderer, as well as a RenderApiSender. Your Renderer is responsible to render the previously processed frames onto the screen.

By calling yourRenderApiSender.create_api(), you'll get a 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.

Frame

What is referred to as a frame, is the current geometry on the screen. A new Frame is created by calling set_display_list() on the RenderApi. When the geometry is processed, the application will be informed via a RenderNotifier, a callback which you employ with set_render_notifier on the Renderer 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.

Reexports

pub extern crate webrender_api;
pub use texture_cache::TexturePage;
pub use renderer::ExternalImage;
pub use renderer::ExternalImageSource;
pub use renderer::ExternalImageHandler;
pub use renderer::GraphicsApi;
pub use renderer::GraphicsApiInfo;
pub use renderer::ReadPixelsFormat;
pub use renderer::Renderer;
pub use renderer::RendererOptions;

Modules

api
border
clip_scroll_node
clip_scroll_tree
debug_colors
debug_font_data
debug_render
device
ellipse
frame
frame_builder
freelist
geometry
glyph_cache
glyph_rasterizer
gpu_cache

Overview of the GPU cache.

internal_types
mask_cache
platform
prim_store
print_tree
profiler
record
render_backend
render_task
renderer

The webrender API.

resource_cache
scene
shader_source
spring
texture_cache
tiling
util
webgl_types

A set of WebGL-related types, in their own module so it's easy to compile it off.

Structs

BinaryRecorder

Statics

WEBRENDER_RECORDING_HEADER

Traits

ApiRecordingReceiver