m97: Update effects/
-use crate::prelude::*;
+use crate::{prelude::*, YUVColorSpace};
use skia_bindings::{self as sb, SkColorMatrix};
use std::fmt;
@@ -65,6 +65,14 @@ impl ColorMatrix {
})
}
+ pub fn rgb_to_yuv(rgb: YUVColorSpace) -> Self {
+ Self::from_native_c(unsafe { sb::SkColorMatrix_RGBtoYUV(rgb) })
+ }
+
+ pub fn yuv_to_rgb(yuv: YUVColorSpace) -> Self {
+ Self::from_native_c(unsafe { sb::SkColorMatrix_YUVtoRGB(yuv) })
+ }
+
pub fn set_identity(&mut self) {
unsafe { self.native_mut().setIdentity() }
}
