Struct webrender::Renderer[][src]

pub struct Renderer {
    result_rx: Receiver<ResultMsg>,
    debug_server: DebugServer,
    pub device: Device,
    pending_texture_updates: Vec<TextureUpdateList>,
    pending_gpu_cache_updates: Vec<GpuCacheUpdateList>,
    pending_shader_updates: Vec<PathBuf>,
    active_documents: Vec<(DocumentId, RenderedDocument)>,
    shaders: Shaders,
    pub gpu_glyph_renderer: GpuGlyphRenderer,
    max_texture_size: u32,
    max_recorded_profiles: usize,
    clear_color: Option<ColorF>,
    enable_clear_scissor: bool,
    debug: LazyInitializedDebugRenderer,
    debug_flags: DebugFlags,
    backend_profile_counters: BackendProfileCounters,
    profile_counters: RendererProfileCounters,
    profiler: Profiler,
    new_frame_indicator: ChangeIndicator,
    new_scene_indicator: ChangeIndicator,
    last_time: u64,
    pub gpu_profile: GpuProfiler<GpuProfileTag>,
    vaos: RendererVAOs,
    node_data_texture: VertexDataTexture,
    local_clip_rects_texture: VertexDataTexture,
    render_task_texture: VertexDataTexture,
    gpu_cache_texture: CacheTexture,
    gpu_cache_frame_id: FrameId,
    gpu_cache_overflow: bool,
    pipeline_info: PipelineInfo,
    texture_resolver: SourceTextureResolver,
    texture_cache_upload_pbo: PBO,
    dither_matrix_texture: Option<Texture>,
    external_image_handler: Option<Box<ExternalImageHandler>>,
    output_image_handler: Option<Box<OutputImageHandler>>,
    output_targets: HashMap<u32, FrameOutput, BuildHasherDefault<FxHasher>>,
    pub renderer_errors: Vec<RendererError>,
    cpu_profiles: VecDeque<CpuProfile>,
    gpu_profiles: VecDeque<GpuProfile>,
    read_fbo: FBOId,
}

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

Fields

Optional trait object that allows the client application to provide external buffers for image data.

Optional trait object that allows the client application to provide a texture handle to copy the WR output to.

List of profile results from previous frames. Can be retrieved via get_frame_profiles().

Methods

impl Renderer
[src]

Initializes webrender and creates a Renderer and RenderApiSender.

Examples

Initializes a Renderer with some reasonable values. For more information see RendererOptions.

This example is not tested
let opts = webrender::RendererOptions {
   device_pixel_ratio: 1.0,
   resource_override_path: None,
   enable_aa: false,
};
let (renderer, sender) = Renderer::new(opts);

Returns the Epoch of the current frame in a pipeline.

Processes the result queue.

Should be called before render(), as texture cache updates are done here.

Set a callback for handling external images.

Set a callback for handling external outputs.

Retrieve (and clear) the current list of recorded frame profiles.

Returns true if the active rendered documents (that need depth buffer) intersect on the main framebuffer, in which case we don't clear the whole depth and instead clear each document area separately.

Renders the current frame.

A Frame is supplied by calling [generate_frame()][genframe]. [genframe]: ../../webrender_api/struct.DocumentApi.html#method.generate_frame

Pass-through to Device::read_pixels_into, used by Gecko's WR bindings.

Important traits for Vec<u8>

impl Renderer
[src]

Auto Trait Implementations

impl !Send for Renderer

impl !Sync for Renderer