pub enum DisplayItem {
Draw(DrawCommand),
PushClip(ClipData),
PopClip,
PushRoundedClip(RoundedClipData),
PopRoundedClip,
PushOpacity(f32),
PopOpacity,
PushTransform(TransformData),
PopTransform,
ExternalSurface(ExternalSurfaceData),
}Expand description
A single display item in the paint list.
Chrome equivalent: DisplayItem (blink) + PaintOp (cc/paint).
Display items are produced by the painter walking the fragment tree. They are consumed by the renderer backend (vello, wgpu, etc.).
Variants§
Draw(DrawCommand)
A concrete draw operation.
Chrome: DrawingDisplayItem wrapping a PaintRecord.
PushClip(ClipData)
Push a clip rectangle onto the clip stack.
Everything drawn until the matching PopClip is clipped to this rect.
Chrome: ClipRectOp.
PopClip
Pop the most recent clip from the stack.
PushRoundedClip(RoundedClipData)
Push a rounded clip onto the clip stack.
Chrome: ClipRRectOp.
PopRoundedClip
Pop the most recent rounded clip from the stack.
PushOpacity(f32)
Push an opacity layer.
Chrome: SaveLayerAlphaOp.
PopOpacity
Pop the opacity layer.
PushTransform(TransformData)
Push a 2D transform.
Chrome: ConcatOp(matrix).
PopTransform
Pop the most recent transform.
ExternalSurface(ExternalSurfaceData)
Composite an external GPU surface into the display list.
Chrome equivalent: ForeignLayerDisplayItem.
This is how 3D content (wgpu scenes), video frames, and other GPU
textures are integrated into the 2D rendering pipeline.
The compositor blends this surface with the surrounding 2D content, respecting clipping, opacity, and z-ordering from the display list.
§2D/3D Unification
A <canvas> element with a wgpu 3D scene produces this item.
The renderer composites it into the final frame alongside vello’s
2D output — enabling game viewports inside UI panels with correct
clipping, layering, and event handling.
Implementations§
Trait Implementations§
Source§impl Clone for DisplayItem
impl Clone for DisplayItem
Source§fn clone(&self) -> DisplayItem
fn clone(&self) -> DisplayItem
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreAuto Trait Implementations§
impl Freeze for DisplayItem
impl !RefUnwindSafe for DisplayItem
impl Send for DisplayItem
impl Sync for DisplayItem
impl Unpin for DisplayItem
impl UnsafeUnpin for DisplayItem
impl !UnwindSafe for DisplayItem
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> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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