1use crate::{Canvas, OwnedCanvas};
2use skia_bindings as sb;
3
4impl Canvas {
5 pub fn new_null() -> OwnedCanvas<'static> {
6 new_null_canvas()
7 }
8}
9
10pub fn new_null_canvas() -> OwnedCanvas<'static> {
11 Canvas::own_from_native_ptr(native:unsafe { sb::C_SkMakeNullCanvas() }).unwrap()
12}
13
14#[test]
15fn test_create_null_canvas() {
16 let nc: OwnedCanvas<'_> = new_null_canvas();
17 drop(nc);
18}
19