render: drop Sync from some traits
This commit is contained in:
parent
e0643e3fad
commit
7b03c06c29
@ -23,19 +23,19 @@ pub trait Sample {
|
||||
fn sample(&mut self, rect: &Rectangle<Virtual>) -> impl PixelView<Pixel = Self::Pixel>;
|
||||
}
|
||||
|
||||
pub trait Shader: Send + Sync {
|
||||
pub trait Shader: Send {
|
||||
fn draw(&self, surface_coords: &VirtualCoordinates, frame: usize) -> Rgb<u8>;
|
||||
}
|
||||
|
||||
pub trait Surfaces: Send + Sync {
|
||||
pub trait Surfaces: Send {
|
||||
type Surface: Surface;
|
||||
type Error: Debug;
|
||||
fn new_surface(&mut self, area: Rectangle<Virtual>) -> Result<Self::Surface, Self::Error>;
|
||||
fn render_to<S: Sample>(&self, output: &mut S, frame: usize);
|
||||
}
|
||||
|
||||
pub trait Surface: Send + Sync {
|
||||
fn set_shader(&mut self, shader: Box<dyn Shader>);
|
||||
pub trait Surface: Send {
|
||||
fn set_shader<T: Shader + 'static>(&mut self, shader: T);
|
||||
fn clear_shader(&mut self);
|
||||
|
||||
fn set_rect(&mut self, rect: Rectangle<Virtual>);
|
||||
|
Loading…
x
Reference in New Issue
Block a user