pub enum CanvasFrameItem {
Shader(ShaderQuadCmd),
Segment {
x: u32,
y: u32,
w: u32,
h: u32,
pixels: Vec<u8>,
},
Glyphs {
glyphs: Vec<GlyphQuad>,
clip: Option<(f32, f32, f32, f32)>,
},
Image {
key: u64,
pixels: ImagePixels,
src_w: u32,
src_h: u32,
dest: (f32, f32, f32, f32),
opacity: f32,
clip: Option<(f32, f32, f32, f32)>,
},
Backdrop {
rect: (f32, f32, f32, f32),
radius: f32,
blur: f32,
tint: [u8; 4],
},
}Expand description
One item of a GPU-mode frame, in z-order (D109 C1): a GPU shape quad, a
CPU-rasterized segment (bbox-sized premultiplied-RGBA buffer cut out of
the scratch pixmap), a batch of atlas glyphs (Step 4), or an image drawn
from the compositor’s texture cache (uploaded on first sight of key).
Variants§
Shader(ShaderQuadCmd)
Segment
Glyphs
Image
Fields
§
pixels: ImagePixelsBackdrop
Frosted-glass panel (D-DEF-012): the compositor blurs everything
drawn before this item within rect and draws a tinted rounded
panel over it. All physical px; tint is sRGB straight-alpha.
Trait Implementations§
Source§impl Clone for CanvasFrameItem
impl Clone for CanvasFrameItem
Source§fn clone(&self) -> CanvasFrameItem
fn clone(&self) -> CanvasFrameItem
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for CanvasFrameItem
impl Debug for CanvasFrameItem
Source§impl PartialEq for CanvasFrameItem
impl PartialEq for CanvasFrameItem
impl StructuralPartialEq for CanvasFrameItem
Auto Trait Implementations§
impl Freeze for CanvasFrameItem
impl RefUnwindSafe for CanvasFrameItem
impl Send for CanvasFrameItem
impl Sync for CanvasFrameItem
impl Unpin for CanvasFrameItem
impl UnsafeUnpin for CanvasFrameItem
impl UnwindSafe for CanvasFrameItem
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