pub struct ShaderDraw {
pub order: DrawOrder,
pub bounds: Bounds<ScaledPixels>,
pub content_mask: ContentMask<ScaledPixels>,
pub opacity: f32,
pub scale_factor: f32,
pub program: Arc<SceneShaderProgram>,
pub glyph_mask: Option<AtlasTile>,
pub path_mask: Option<Arc<Path<ScaledPixels>>>,
pub data: [[f32; 4]; 8],
}Expand description
Immutable instance recorded into a scene and retained through paint replay.
Fields§
§order: DrawOrderHost draw order, assigned on insertion.
bounds: Bounds<ScaledPixels>Full source bounds in device pixels, including any effect outset.
content_mask: ContentMask<ScaledPixels>Host clipping in device pixels.
opacity: f32Inherited element opacity, applied exactly once by the generated wrapper.
scale_factor: f32Logical-to-device scale used for shader coordinates.
program: Arc<SceneShaderProgram>Immutable program handle.
glyph_mask: Option<AtlasTile>Optional retained grayscale atlas tile. Masked programs batch by texture.
path_mask: Option<Arc<Path<ScaledPixels>>>Native opaque-white coverage, rasterized into the existing path target. Disjoint composite bounds can share a coverage/composition batch.
data: [[f32; 4]; 8]Reflected and packed payload. Unused slots are zero.
Implementations§
Source§impl ShaderDraw
impl ShaderDraw
Sourcepub fn validate_masks(&self) -> Result<()>
pub fn validate_masks(&self) -> Result<()>
Check mask ownership before preparing backend resources.
Sourcepub fn instance_data(&self) -> [[f32; 4]; 11]
pub fn instance_data(&self) -> [[f32; 4]; 11]
Transport layout: bounds, clip, opacity/scale, then payload; 176 bytes.
Trait Implementations§
Source§impl Clone for ShaderDraw
impl Clone for ShaderDraw
Auto Trait Implementations§
impl Freeze for ShaderDraw
impl RefUnwindSafe for ShaderDraw
impl Send for ShaderDraw
impl Sync for ShaderDraw
impl Unpin for ShaderDraw
impl UnsafeUnpin for ShaderDraw
impl UnwindSafe for ShaderDraw
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
Mutably borrows from an owned value. Read more
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
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> ⓘ
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 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> ⓘ
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