m88: Review YUVAIndex
@@ -12,8 +12,8 @@ pub fn test_yuva_index_naming() {
#[repr(C)]
#[derive(Copy, Clone, PartialEq, Eq, Debug)]
pub struct YUVAIndex {
- pub(crate) index: i32,
- pub(crate) channel: ColorChannel,
+ pub index: i32,
+ pub channel: ColorChannel,
}
impl Default for YUVAIndex {
@@ -24,11 +24,6 @@ impl Default for YUVAIndex {
impl NativeTransmutable<SkYUVAIndex> for YUVAIndex {}
-#[test]
-fn test_yuva_index_layout() {
- YUVAIndex::test_layout()
-}
-
impl YUVAIndex {
pub const INDEX_COUNT: usize = 4;
@@ -54,3 +49,13 @@ impl YUVAIndex {
.if_true_then_some(|| num_planes.try_into().unwrap())
}
}
+
+#[cfg(test)]
+mod tests {
+ use crate::prelude::NativeTransmutable;
+
+ #[test]
+ fn test_yuva_index_layout() {
+ super::YUVAIndex::test_layout()
+ }
+}
