webrender

Struct Shaders

Source
pub struct Shaders {
Show 35 fields loader: ShaderLoader, cs_blur_rgba8: ShaderHandle, cs_border_segment: ShaderHandle, cs_border_solid: ShaderHandle, cs_scale: Vec<Option<ShaderHandle>>, cs_line_decoration: ShaderHandle, cs_fast_linear_gradient: ShaderHandle, cs_linear_gradient: ShaderHandle, cs_radial_gradient: ShaderHandle, cs_conic_gradient: ShaderHandle, cs_svg_filter: ShaderHandle, cs_svg_filter_node: ShaderHandle, brush_solid: BrushShader, brush_image: Vec<Option<BrushShader>>, brush_fast_image: Vec<Option<BrushShader>>, brush_blend: BrushShader, brush_mix_blend: BrushShader, brush_yuv_image: Vec<Option<BrushShader>>, brush_linear_gradient: BrushShader, brush_opacity: BrushShader, brush_opacity_aa: BrushShader, cs_clip_rectangle_slow: ShaderHandle, cs_clip_rectangle_fast: ShaderHandle, cs_clip_box_shadow: ShaderHandle, ps_text_run: TextShader, ps_text_run_dual_source: Option<TextShader>, ps_split_composite: ShaderHandle, ps_quad_textured: ShaderHandle, ps_quad_radial_gradient: ShaderHandle, ps_quad_conic_gradient: ShaderHandle, ps_mask: ShaderHandle, ps_mask_fast: ShaderHandle, ps_clear: ShaderHandle, ps_copy: ShaderHandle, composite: CompositorShaders,
}

Fields§

§loader: ShaderLoader§cs_blur_rgba8: ShaderHandle§cs_border_segment: ShaderHandle§cs_border_solid: ShaderHandle§cs_scale: Vec<Option<ShaderHandle>>§cs_line_decoration: ShaderHandle§cs_fast_linear_gradient: ShaderHandle§cs_linear_gradient: ShaderHandle§cs_radial_gradient: ShaderHandle§cs_conic_gradient: ShaderHandle§cs_svg_filter: ShaderHandle§cs_svg_filter_node: ShaderHandle§brush_solid: BrushShader§brush_image: Vec<Option<BrushShader>>§brush_fast_image: Vec<Option<BrushShader>>§brush_blend: BrushShader§brush_mix_blend: BrushShader§brush_yuv_image: Vec<Option<BrushShader>>§brush_linear_gradient: BrushShader§brush_opacity: BrushShader§brush_opacity_aa: BrushShader§cs_clip_rectangle_slow: ShaderHandle

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.

§cs_clip_rectangle_fast: ShaderHandle§cs_clip_box_shadow: ShaderHandle§ps_text_run: TextShader§ps_text_run_dual_source: Option<TextShader>§ps_split_composite: ShaderHandle§ps_quad_textured: ShaderHandle§ps_quad_radial_gradient: ShaderHandle§ps_quad_conic_gradient: ShaderHandle§ps_mask: ShaderHandle§ps_mask_fast: ShaderHandle§ps_clear: ShaderHandle§ps_copy: ShaderHandle§composite: CompositorShaders

Implementations§

Source§

impl Shaders

Source

pub fn new( device: &mut Device, gl_type: GlType, options: &WebRenderOptions, ) -> Result<Self, ShaderError>

Source

pub fn precache_all( &mut self, precache_flags: ShaderPrecacheFlags, ) -> PendingShadersToPrecache

Source

pub fn resume_precache( &mut self, device: &mut Device, pending_shaders: &mut PendingShadersToPrecache, ) -> Result<bool, ShaderError>

Returns true if another call is needed, false if precaching is finished.

Source

fn get_compositing_shader_index(buffer_kind: ImageBufferKind) -> usize

Source

pub fn get_composite_shader( &mut self, format: CompositeSurfaceFormat, buffer_kind: ImageBufferKind, features: CompositeFeatures, ) -> &mut LazilyCompiledShader

Source

pub fn get_scale_shader( &mut self, buffer_kind: ImageBufferKind, ) -> &mut LazilyCompiledShader

Source

pub fn get_quad_shader( &mut self, pattern: PatternKind, ) -> &mut LazilyCompiledShader

Source

pub fn get( &mut self, key: &BatchKey, features: BatchFeatures, debug_flags: DebugFlags, device: &Device, ) -> &mut LazilyCompiledShader

Source

pub fn get_handle( &mut self, key: &BatchKey, features: BatchFeatures, debug_flags: DebugFlags, device: &Device, ) -> ShaderHandle

Source

pub fn cs_blur_rgba8(&mut self) -> &mut LazilyCompiledShader

Source

pub fn cs_border_segment(&mut self) -> &mut LazilyCompiledShader

Source

pub fn cs_border_solid(&mut self) -> &mut LazilyCompiledShader

Source

pub fn cs_line_decoration(&mut self) -> &mut LazilyCompiledShader

Source

pub fn cs_fast_linear_gradient(&mut self) -> &mut LazilyCompiledShader

Source

pub fn cs_linear_gradient(&mut self) -> &mut LazilyCompiledShader

Source

pub fn cs_radial_gradient(&mut self) -> &mut LazilyCompiledShader

Source

pub fn cs_conic_gradient(&mut self) -> &mut LazilyCompiledShader

Source

pub fn cs_svg_filter(&mut self) -> &mut LazilyCompiledShader

Source

pub fn cs_svg_filter_node(&mut self) -> &mut LazilyCompiledShader

Source

pub fn cs_clip_rectangle_slow(&mut self) -> &mut LazilyCompiledShader

Source

pub fn cs_clip_rectangle_fast(&mut self) -> &mut LazilyCompiledShader

Source

pub fn cs_clip_box_shadow(&mut self) -> &mut LazilyCompiledShader

Source

pub fn ps_quad_textured(&mut self) -> &mut LazilyCompiledShader

Source

pub fn ps_mask(&mut self) -> &mut LazilyCompiledShader

Source

pub fn ps_mask_fast(&mut self) -> &mut LazilyCompiledShader

Source

pub fn ps_clear(&mut self) -> &mut LazilyCompiledShader

Source

pub fn ps_copy(&mut self) -> &mut LazilyCompiledShader

Source

pub fn deinit(self, device: &mut Device)

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.