pub struct ImageScaleAndAdd { /* private fields */ }Expand description
Convenience wrapper for scale-and-add semantics implemented with MPSImageAdd.
Implementations§
Source§impl ImageScaleAndAdd
impl ImageScaleAndAdd
Sourcepub fn new(
device: &MetalDevice,
primary_scale: f32,
secondary_scale: f32,
bias: f32,
) -> Option<Self>
pub fn new( device: &MetalDevice, primary_scale: f32, secondary_scale: f32, bias: f32, ) -> Option<Self>
Build an image add kernel with non-unit primary/secondary scales.
Sourcepub fn encode_image(
&self,
command_buffer: &CommandBuffer,
primary: &Image,
secondary: &Image,
destination: &Image,
)
pub fn encode_image( &self, command_buffer: &CommandBuffer, primary: &Image, secondary: &Image, destination: &Image, )
Wraps the corresponding MPSImageAdd encode entry point.
Sourcepub fn encode_texture(
&self,
command_buffer: &CommandBuffer,
primary: &MetalTexture,
secondary: &MetalTexture,
destination: &MetalTexture,
)
pub fn encode_texture( &self, command_buffer: &CommandBuffer, primary: &MetalTexture, secondary: &MetalTexture, destination: &MetalTexture, )
Wraps the corresponding MPSImageAdd encode entry point.
Sourcepub fn set_primary_edge_mode(&self, edge_mode: usize)
pub fn set_primary_edge_mode(&self, edge_mode: usize)
Wraps the corresponding MPSImageAdd setter.
Sourcepub fn set_secondary_edge_mode(&self, edge_mode: usize)
pub fn set_secondary_edge_mode(&self, edge_mode: usize)
Wraps the corresponding MPSImageAdd setter.
Sourcepub fn set_clip_rect(&self, region: ImageRegion)
pub fn set_clip_rect(&self, region: ImageRegion)
Wraps the corresponding MPSImageAdd setter.
Auto Trait Implementations§
impl Freeze for ImageScaleAndAdd
impl RefUnwindSafe for ImageScaleAndAdd
impl Send for ImageScaleAndAdd
impl Sync for ImageScaleAndAdd
impl Unpin for ImageScaleAndAdd
impl UnsafeUnpin for ImageScaleAndAdd
impl UnwindSafe for ImageScaleAndAdd
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