Lines Matching refs:bytes_per_pixel
170 pub fn bytes_per_pixel(&self, plane: usize) -> Option<usize> { in bytes_per_pixel() method
497 let bytes_per_pixel = self in map() localVariable
499 .bytes_per_pixel(plane) in map()
538 let x_offset_bytes = checked_arithmetic!(x * bytes_per_pixel)?; in map()
573 let bytes_per_pixel = match self.format().bytes_per_pixel(plane) { in read_to_volatile() localVariable
577 let line_copy_size = checked_arithmetic!(width * bytes_per_pixel)?; in read_to_volatile()
647 let bytes_per_pixel = self.format().bytes_per_pixel(plane).unwrap_or(0) as u64; in write_from_sg() localVariable
648 let line_copy_size = checked_arithmetic!(width * bytes_per_pixel)?; in write_from_sg()
752 assert_eq!(f.bytes_per_pixel(0), Some(4)); in format_bytes_per_pixel()
753 assert_eq!(f.bytes_per_pixel(1), None); in format_bytes_per_pixel()
755 assert_eq!(f.bytes_per_pixel(0), Some(1)); in format_bytes_per_pixel()
756 assert_eq!(f.bytes_per_pixel(1), Some(1)); in format_bytes_per_pixel()
757 assert_eq!(f.bytes_per_pixel(2), None); in format_bytes_per_pixel()
759 assert_eq!(f.bytes_per_pixel(0), Some(1)); in format_bytes_per_pixel()
760 assert_eq!(f.bytes_per_pixel(1), None); in format_bytes_per_pixel()
762 assert_eq!(f.bytes_per_pixel(0), Some(3)); in format_bytes_per_pixel()
763 assert_eq!(f.bytes_per_pixel(1), None); in format_bytes_per_pixel()
765 assert_eq!(f.bytes_per_pixel(0), Some(2)); in format_bytes_per_pixel()
766 assert_eq!(f.bytes_per_pixel(1), None); in format_bytes_per_pixel()
768 assert_eq!(f.bytes_per_pixel(0), None); in format_bytes_per_pixel()