Module webrender::renderer [] [src]

The webrender API.

The webrender::renderer module provides the interface to webrender, which is accessible through Renderer

Reexports

use api::BlobImageRenderer;
use api::ColorF;
use api::ColorU;
use api::DeviceIntPoint;
use api::DeviceIntRect;
use api::DeviceIntSize;
use api::DeviceUintPoint;
use api::DeviceUintRect;
use api::DeviceUintSize;
use api::DocumentId;
use api::Epoch;
use api::ExternalImageId;
use api::ExternalImageType;
use api::FontRenderMode;
use api::ImageFormat;
use api::PipelineId;
use api::RenderApiSender;
use api::RenderNotifier;
use api::YUV_COLOR_SPACES;
use api::YUV_FORMATS;
use api::YuvColorSpace;
use api::YuvFormat;
use api::channel;
use api::ApiMsg;
use api::DebugCommand;
use api::channel::MsgSender;
use batch::BatchKey;
use batch::BatchKind;
use batch::BatchTextures;
use batch::BrushBatchKind;
use batch::BrushImageSourceKind;
use batch::TransformBatchKind;
use debug_colors;
use debug_render::DebugRenderer;
use device::DepthFunction;
use device::Device;
use device::FrameId;
use device::Program;
use device::UploadMethod;
use device::Texture;
use device::VertexDescriptor;
use device::PBO;
use device::get_gl_format_bgra;
use device::ExternalTexture;
use device::FBOId;
use device::TextureSlot;
use device::VertexAttribute;
use device::VertexAttributeKind;
use device::FileWatcherHandler;
use device::ShaderError;
use device::TextureFilter;
use device::TextureTarget;
use device::VertexUsageHint;
use device::VAO;
use device::VBO;
use device::CustomVAO;
use device::ProgramCache;
use euclid::rect;
use euclid::Transform3D;
use frame_builder::FrameBuilderConfig;
use gleam::gl;
use glyph_rasterizer::GlyphFormat;
use gpu_cache::GpuBlockData;
use gpu_cache::GpuCacheUpdate;
use gpu_cache::GpuCacheUpdateList;
use gpu_types::PrimitiveInstance;
use internal_types::SourceTexture;
use internal_types::ORTHO_FAR_PLANE;
use internal_types::ORTHO_NEAR_PLANE;
use internal_types::CacheTextureId;
use internal_types::FastHashMap;
use internal_types::RenderedDocument;
use internal_types::ResultMsg;
use internal_types::TextureUpdateOp;
use internal_types::DebugOutput;
use internal_types::RenderPassIndex;
use internal_types::RenderTargetInfo;
use internal_types::TextureUpdateList;
use internal_types::TextureUpdateSource;
use picture::ContentOrigin;
use profiler::BackendProfileCounters;
use profiler::Profiler;
use profiler::GpuProfileTag;
use profiler::RendererProfileCounters;
use profiler::RendererProfileTimers;
use query::GpuProfiler;
use query::GpuTimer;
use rayon::Configuration as ThreadPoolConfig;
use rayon::ThreadPool;
use record::ApiRecordingReceiver;
use render_backend::RenderBackend;
use render_task::RenderTaskKind;
use render_task::RenderTaskTree;
use std;
use std::cmp;
use std::collections::VecDeque;
use std::collections::hash_map::Entry;
use std::f32;
use std::mem;
use std::path::PathBuf;
use std::rc::Rc;
use std::sync::Arc;
use std::sync::mpsc::channel;
use std::sync::mpsc::Receiver;
use std::sync::mpsc::Sender;
use std::thread;
use texture_cache::TextureCache;
use thread_profiler::register_thread_with_profiler;
use thread_profiler::write_profile;
use tiling::AlphaRenderTarget;
use tiling::ColorRenderTarget;
use tiling::RenderPass;
use tiling::RenderPassKind;
use tiling::RenderTargetList;
use tiling::Frame;
use tiling::RenderTarget;
use tiling::ScalingInfo;
use time::precise_time_ns;
use util::TransformedRectKind;

Structs

BrushShader
CacheRow
CacheTexture

The device-specific representation of the cache texture in gpu_cache.rs

CpuProfile
DebugFlags
DebugServer
ExternalImage

The data that an external client should provide about an external image. The timestamp is used to test if the renderer should upload new texture data this frame. For instance, if providing video frames, the application could call wr.render() whenever a new video frame is ready. If the callback increments the returned timestamp for a given image, the renderer will know to re-upload the image data to the GPU. Note that the UV coords are supplied in texel-space!

FileWatcher
FrameOutput
GpuProfile
GraphicsApiInfo
LazilyCompiledShader
PackedVertex
PrimitiveShader
RenderTargetPoolId
Renderer

The renderer is responsible for submitting to the GPU the work prepared by the RenderBackend.

RendererOptions
RendererStats
SourceTextureResolver
TargetSelector
TextShader
VertexDataTexture

Enums

BlendMode
CacheBus

The bus over which CPU and GPU versions of the cache get synchronized.

ExternalImageSource
GraphicsApi
ImageBufferKind
ReadPixelsFormat
RendererError
RendererKind
ShaderKind
TextShaderMode
TextureSampler
VertexArrayKind

Constants

ALPHA_FEATURE
BLOCKS_PER_UV_RECT

Number of GPU blocks per UV rectangle provided for an image.

DESC_BLUR
DESC_CLIP
DESC_GPU_CACHE_UPDATE
DESC_PRIM_INSTANCES
GPU_CACHE_RESIZE_TEST

Enabling this toggle would force the GPU cache scattered texture to be resized every frame, which enables GPU debuggers to see if this is performed correctly.

GPU_SAMPLER_TAG_ALPHA
GPU_SAMPLER_TAG_OPAQUE
GPU_SAMPLER_TAG_TRANSPARENT
GPU_TAG_BLUR
GPU_TAG_BRUSH_IMAGE
GPU_TAG_BRUSH_LINE
GPU_TAG_BRUSH_MASK
GPU_TAG_BRUSH_SOLID
GPU_TAG_CACHE_CLIP
GPU_TAG_CACHE_LINE
GPU_TAG_CACHE_TEXT_RUN
GPU_TAG_PRIM_ANGLE_GRADIENT
GPU_TAG_PRIM_BLEND
GPU_TAG_PRIM_BORDER_CORNER
GPU_TAG_PRIM_BORDER_EDGE
GPU_TAG_PRIM_COMPOSITE
GPU_TAG_PRIM_GRADIENT
GPU_TAG_PRIM_HW_COMPOSITE
GPU_TAG_PRIM_IMAGE
GPU_TAG_PRIM_RADIAL_GRADIENT
GPU_TAG_PRIM_SPLIT_COMPOSITE
GPU_TAG_PRIM_TEXT_RUN
GPU_TAG_PRIM_YUV_IMAGE
GPU_TAG_SETUP_DATA
GPU_TAG_SETUP_TARGET
IMAGE_BUFFER_KINDS
MAX_VERTEX_TEXTURE_WIDTH
TRANSFORM_FEATURE

Traits

ExternalImageHandler

The interfaces that an application can implement to support providing external image buffers. When the the application passes an external image to WR, it should kepp 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.

OutputImageHandler

Allows callers to receive a texture with the contents of a specific pipeline copied to it. Lock should return the native texture handle and the size of the texture. Unlock will only be called if the lock() call succeeds, when WR has issued the GL commands to copy the output to the texture handle.

ThreadListener

Functions

create_clip_shader
create_prim_shader
flag_changed

Type Definitions

ShaderMode