Struct webrender::renderer::Renderer [] [src]

pub struct Renderer {
    result_rx: Receiver<ResultMsg>,
    debug_server: DebugServer,
    device: Device,
    pending_texture_updates: Vec<TextureUpdateList>,
    pending_gpu_cache_updates: Vec<GpuCacheUpdateList>,
    pending_shader_updates: Vec<PathBuf>,
    current_frame: Option<RendererFrame>,
    cs_text_run: LazilyCompiledShader,
    cs_line: LazilyCompiledShader,
    cs_blur_a8: LazilyCompiledShader,
    cs_blur_rgba8: LazilyCompiledShader,
    brush_mask: LazilyCompiledShader,
    cs_clip_rectangle: LazilyCompiledShader,
    cs_clip_image: LazilyCompiledShader,
    cs_clip_border: LazilyCompiledShader,
    ps_rectangle: PrimitiveShader,
    ps_rectangle_clip: PrimitiveShader,
    ps_text_run: PrimitiveShader,
    ps_image: Vec<Option<PrimitiveShader>>,
    ps_yuv_image: Vec<Option<PrimitiveShader>>,
    ps_border_corner: PrimitiveShader,
    ps_border_edge: PrimitiveShader,
    ps_gradient: PrimitiveShader,
    ps_angle_gradient: PrimitiveShader,
    ps_radial_gradient: PrimitiveShader,
    ps_cache_image_rgba8: PrimitiveShader,
    ps_cache_image_a8: PrimitiveShader,
    ps_line: PrimitiveShader,
    ps_blend: LazilyCompiledShader,
    ps_hw_composite: LazilyCompiledShader,
    ps_split_composite: LazilyCompiledShader,
    ps_composite: LazilyCompiledShader,
    notifier: Arc<Mutex<Option<Box<RenderNotifier>>>>,
    max_texture_size: u32,
    max_recorded_profiles: usize,
    clear_framebuffer: bool,
    clear_color: ColorF,
    enable_clear_scissor: bool,
    debug: DebugRenderer,
    debug_flags: DebugFlags,
    enable_batcher: bool,
    backend_profile_counters: BackendProfileCounters,
    profile_counters: RendererProfileCounters,
    profiler: Profiler,
    last_time: u64,
    color_render_targets: Vec<Texture>,
    alpha_render_targets: Vec<Texture>,
    gpu_profile: GpuProfiler<GpuProfileTag>,
    prim_vao: VAO,
    blur_vao: VAO,
    clip_vao: VAO,
    layer_texture: VertexDataTexture,
    render_task_texture: VertexDataTexture,
    gpu_cache_texture: CacheTexture,
    pipeline_epoch_map: HashMap<PipelineId, Epoch, BuildHasherDefault<FxHasher>>,
    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>>,
    renderer_errors: Vec<RendererError>,
    cpu_profiles: VecDeque<CpuProfile>,
    gpu_profiles: VecDeque<GpuProfile>,
}

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

Fields

These are "cache clip shaders". These shaders are used to draw clip instances into the cached clip mask. The results of these shaders are also used by the primitive shaders.

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]

[src]

Initializes webrender and creates a Renderer and RenderApiSender.

Examples

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

Be careful when using this code, it's not being tested!
let opts = webrender::RendererOptions {
   device_pixel_ratio: 1.0,
   resource_override_path: None,
   enable_aa: false,
};
let (renderer, sender) = Renderer::new(opts);

[src]

[src]

[src]

[src]

Sets the new RenderNotifier.

The RenderNotifier will be called when processing e.g. of a (scrolling) frame is done, and therefore the screen should be updated.

[src]

Returns the Epoch of the current frame in a pipeline.

[src]

Returns a HashMap containing the pipeline ids that have been received by the renderer and their respective epochs since the last time the method was called.

[src]

Processes the result queue.

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

[src]

[src]

[src]

Set a callback for handling external images.

[src]

Set a callback for handling external outputs.

[src]

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

[src]

Renders the current frame.

A Frame is supplied by calling generate_frame().

[src]

[src]

[src]

[src]

[src]

[src]

[src]

[src]

[src]

[src]

[src]

[src]

[src]

[src]

[src]

[src]

[src]

[src]

[src]

[src]