azul_webrender

Struct RendererOptions

Source
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§

Source§

impl Default for RendererOptions

Source§

fn default() -> Self

Returns the “default value” for a type. Read more

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> IntoEither for T

Source§

fn into_either(self, into_left: bool) -> Either<Self, Self>

Converts 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 more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where F: FnOnce(&Self) -> bool,

Converts 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
Source§

impl<T> Pointable for T

Source§

const ALIGN: usize = _

The alignment of pointer.
Source§

type Init = T

The type for initializers.
Source§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
Source§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
Source§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
Source§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.