render: merge Framed trait into Display

This commit is contained in:
2024-11-29 00:14:06 +01:00
parent 2f9b99c2b0
commit d28c2a1a4c
2 changed files with 16 additions and 52 deletions

View File

@@ -27,13 +27,10 @@ pub trait Surface: Default + Clone + Debug {
fn set_opacity(&mut self, opacity: u8);
}
pub trait Framed {
pub trait Display<T: Surface>: Surfaces<T> {
fn start_frame(&mut self) {}
fn end_frame(&mut self) {}
}
pub trait Display<T: Surface>: Surfaces<T> + Framed {
fn render_frame(&mut self);
fn end_frame(&mut self) {}
}
#[derive(Debug)]