pub struct Converter { /* private fields */ }
Expand description
State for converting colors between canvas.
Implementations§
Source§impl Converter
impl Converter
pub fn new() -> Self
Sourcepub fn run_to_completion(
&mut self,
frame_in: &Canvas,
frame_out: &mut Canvas,
) -> Result<(), ConversionError>
pub fn run_to_completion( &mut self, frame_in: &Canvas, frame_out: &mut Canvas, ) -> Result<(), ConversionError>
Convert the color information of a whole frame into the colors of another.
This is a combined operation that plans the internal operation for conversion, how to schedule them across texels, how to read and write the data, and then runs all of it on two owned canvases.
Sourcepub fn plan(
&mut self,
in_layout: CanvasLayout,
out_layout: CanvasLayout,
) -> Result<ConverterRun<'_>, ConversionError>
pub fn plan( &mut self, in_layout: CanvasLayout, out_layout: CanvasLayout, ) -> Result<ConverterRun<'_>, ConversionError>
Build a converter of color information from one frame into another.
Auto Trait Implementations§
impl Freeze for Converter
impl RefUnwindSafe for Converter
impl Send for Converter
impl Sync for Converter
impl Unpin for Converter
impl UnwindSafe for Converter
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more