summaryrefslogtreecommitdiffstats
path: root/wgpu/src/widget/canvas/layer.rs
blob: 8c069f184e2c205f0de03d4be2a9cd4c72da8a18 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
mod cached;

pub use cached::Cached;

use crate::{canvas::Frame, triangle};

use iced_native::Size;
use std::sync::Arc;

pub trait Layer: std::fmt::Debug {
    fn draw(&self, bounds: Size) -> Arc<triangle::Mesh2D>;
}

pub trait Drawable {
    fn draw(&self, frame: &mut Frame);
}