summaryrefslogblamecommitdiffstats
path: root/wgpu/src/primitive.rs
blob: a8f1119c4ccaf3b45dda21231eb903d94981956f (plain) (tree)
1
2
3
4
5


                                    

                                                        











                                              
use crate::core::Rectangle;
use crate::graphics::{Damage, Mesh};

pub type Primitive = crate::graphics::Primitive<Custom>;

#[derive(Debug, Clone, PartialEq)]
pub enum Custom {
    Mesh(Mesh),
}

impl Damage for Custom {
    fn bounds(&self) -> Rectangle {
        match self {
            Self::Mesh(mesh) => mesh.bounds(),
        }
    }
}