1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
//! Draw command traits and barrier requirements.
//!
//! This module defines the core traits and types for graphics rendering commands
//! in the unified command system.
use crate::;
/// Trait for graphics rendering commands that can be processed by draw pipelines.
///
/// Implement this trait for structs that represent graphics operations such as
/// shape drawing, text rendering, image display, or custom visual effects.
///
/// # Example
///
/// ```
/// use tessera_ui::{BarrierRequirement, DrawCommand};
///
/// #[derive(PartialEq, Clone)]
/// struct RectangleCommand {
/// color: [f32; 4],
/// corner_radius: f32,
/// }
///
/// impl DrawCommand for RectangleCommand {
/// // Most commands don't need barriers
/// fn barrier(&self) -> Option<BarrierRequirement> {
/// None
/// }
/// }
/// ```