pub struct GpuWebPEncoder { /* private fields */ }Expand description
GPU-accelerated WebP encoder
Implementations§
Source§impl GpuWebPEncoder
impl GpuWebPEncoder
Sourcepub fn is_available(&self) -> bool
pub fn is_available(&self) -> bool
Check if GPU acceleration is available
Sourcepub fn encode(
&self,
image: &RawImage,
config: &WebPConfig,
) -> EncodingResult<Vec<u8>>
pub fn encode( &self, image: &RawImage, config: &WebPConfig, ) -> EncodingResult<Vec<u8>>
Encode image using GPU
Sourcepub fn backend_name(&self) -> String
pub fn backend_name(&self) -> String
Get GPU backend name
Sourcepub fn device_info(&self) -> Option<String>
pub fn device_info(&self) -> Option<String>
Get device information
Source§impl GpuWebPEncoder
Helper functions for GPU encoding
impl GpuWebPEncoder
Helper functions for GPU encoding
Sourcepub fn estimate_encoding_time(&self, width: u32, height: u32) -> Duration
pub fn estimate_encoding_time(&self, width: u32, height: u32) -> Duration
Estimate encoding time based on image size and GPU
Sourcepub fn is_size_suitable(&self, width: u32, height: u32) -> bool
pub fn is_size_suitable(&self, width: u32, height: u32) -> bool
Check if image size is suitable for GPU encoding
Auto Trait Implementations§
impl !RefUnwindSafe for GpuWebPEncoder
impl !UnwindSafe for GpuWebPEncoder
impl Freeze for GpuWebPEncoder
impl Send for GpuWebPEncoder
impl Sync for GpuWebPEncoder
impl Unpin for GpuWebPEncoder
impl UnsafeUnpin for GpuWebPEncoder
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