pub struct RendererOptions {Show 45 fields
pub resource_override_path: Option<PathBuf>,
pub use_optimized_shaders: bool,
pub enable_aa: bool,
pub enable_dithering: bool,
pub max_recorded_profiles: usize,
pub precache_flags: ShaderPrecacheFlags,
pub enable_subpixel_aa: bool,
pub force_subpixel_aa: bool,
pub clear_color: ColorF,
pub enable_clear_scissor: bool,
pub max_internal_texture_size: Option<i32>,
pub image_tiling_threshold: i32,
pub upload_method: UploadMethod,
pub upload_pbo_default_size: usize,
pub workers: Option<Arc<ThreadPool>>,
pub enable_multithreading: bool,
pub blob_image_handler: Option<Box<dyn BlobImageHandler>>,
pub crash_annotator: Option<Box<dyn CrashAnnotator>>,
pub size_of_op: Option<VoidPtrToSizeFn>,
pub enclosing_size_of_op: Option<VoidPtrToSizeFn>,
pub cached_programs: Option<Rc<ProgramCache>>,
pub debug_flags: DebugFlags,
pub renderer_id: Option<u64>,
pub scene_builder_hooks: Option<Box<dyn SceneBuilderHooks + Send>>,
pub sampler: Option<Box<dyn AsyncPropertySampler + Send>>,
pub chase_primitive: ChasePrimitive,
pub support_low_priority_transactions: bool,
pub namespace_alloc_by_client: bool,
pub testing: bool,
pub gpu_supports_fast_clears: bool,
pub allow_dual_source_blending: bool,
pub allow_advanced_blend_equation: bool,
pub allow_texture_storage_support: bool,
pub allow_texture_swizzling: bool,
pub clear_caches_with_quads: bool,
pub dump_shader_source: Option<String>,
pub surface_origin_is_top_left: bool,
pub compositor_config: CompositorConfig,
pub enable_gpu_markers: bool,
pub panic_on_gl_error: bool,
pub picture_tile_size: Option<DeviceIntSize>,
pub texture_cache_config: TextureCacheConfig,
pub enable_instancing: bool,
pub reject_software_rasterizer: bool,
pub low_quality_pinch_zoom: bool,
}
Fields§
§resource_override_path: Option<PathBuf>
§use_optimized_shaders: bool
Whether to use shaders that have been optimized at build time.
enable_aa: bool
§enable_dithering: bool
§max_recorded_profiles: usize
§precache_flags: ShaderPrecacheFlags
§enable_subpixel_aa: bool
Enable sub-pixel anti-aliasing if a fast implementation is available.
force_subpixel_aa: bool
Enable sub-pixel anti-aliasing if it requires a slow implementation.
clear_color: ColorF
§enable_clear_scissor: bool
§max_internal_texture_size: Option<i32>
§image_tiling_threshold: i32
§upload_method: UploadMethod
§upload_pbo_default_size: usize
The default size in bytes for PBOs used to upload texture data.
workers: Option<Arc<ThreadPool>>
§enable_multithreading: bool
§blob_image_handler: Option<Box<dyn BlobImageHandler>>
§crash_annotator: Option<Box<dyn CrashAnnotator>>
§size_of_op: Option<VoidPtrToSizeFn>
§enclosing_size_of_op: Option<VoidPtrToSizeFn>
§cached_programs: Option<Rc<ProgramCache>>
§debug_flags: DebugFlags
§renderer_id: Option<u64>
§scene_builder_hooks: Option<Box<dyn SceneBuilderHooks + Send>>
§sampler: Option<Box<dyn AsyncPropertySampler + Send>>
§chase_primitive: ChasePrimitive
§support_low_priority_transactions: bool
§namespace_alloc_by_client: bool
§testing: bool
§gpu_supports_fast_clears: bool
Set to true if this GPU supports hardware fast clears as a performance optimization. Likely requires benchmarking on various GPUs to see if it is a performance win. The default is false, which tends to be best performance on lower end / integrated GPUs.
allow_dual_source_blending: bool
§allow_advanced_blend_equation: bool
§allow_texture_storage_support: bool
If true, allow textures to be initialized with glTexStorage. This affects VRAM consumption and data upload paths.
allow_texture_swizzling: bool
If true, we allow the data uploaded in a different format from the one expected by the driver, pretending the format is matching, and swizzling the components on all the shader sampling.
clear_caches_with_quads: bool
Use ps_clear
shader with batched quad rendering to clear the rects
in texture cache and picture cache tasks.
This helps to work around some Intel drivers
that incorrectly synchronize clears to following draws.
dump_shader_source: Option<String>
Output the source of the shader with the given name.
surface_origin_is_top_left: bool
§compositor_config: CompositorConfig
The configuration options defining how WR composites the final scene.
enable_gpu_markers: bool
§panic_on_gl_error: bool
If true, panic whenever a GL error occurs. This has a significant performance impact, so only use when debugging specific problems!
picture_tile_size: Option<DeviceIntSize>
§texture_cache_config: TextureCacheConfig
§enable_instancing: bool
If true, we’ll use instanced vertex attributes. Each instace is a quad. If false, we’ll duplicate the instance attributes per vertex and issue regular indexed draws instead.
reject_software_rasterizer: bool
If true, we’ll reject contexts backed by a software rasterizer, except Software WebRender.
low_quality_pinch_zoom: bool
If enabled, pinch-zoom will apply the zoom factor during compositing of picture cache tiles. This is higher performance (tiles are not re-rasterized during zoom) but lower quality result. For most display items, if the zoom factor is relatively small, bilinear filtering should make the result look quite close to the high-quality zoom, except for glyphs.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for RendererOptions
impl !RefUnwindSafe for RendererOptions
impl !Send for RendererOptions
impl !Sync for RendererOptions
impl Unpin for RendererOptions
impl !UnwindSafe for RendererOptions
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more