m82: update effects/overdraw_color_filter.rs
use crate::prelude::*;
-use crate::{ColorFilter, PMColor};
+use crate::{Color, ColorFilter};
use skia_bindings as sb;
use skia_bindings::SkColorFilter;
pub const NUM_COLORS: usize = 6;
impl RCHandle<SkColorFilter> {
- pub fn overdraw(colors: &[PMColor; NUM_COLORS]) -> ColorFilter {
+ pub fn overdraw(colors: &[Color; NUM_COLORS]) -> ColorFilter {
new(colors)
}
}
-pub fn new(colors: &[PMColor; NUM_COLORS]) -> ColorFilter {
- ColorFilter::from_ptr(unsafe { sb::C_SkOverdrawColorFilter_Make(colors.as_ptr()) }).unwrap()
+pub fn new(colors: &[Color; NUM_COLORS]) -> ColorFilter {
+ ColorFilter::from_ptr(unsafe {
+ sb::C_SkOverdrawColorFilter_MakeWithSkColors(colors.native().as_ptr())
+ })
+ .unwrap()
}
