Skip to content
Permalink
Browse files

Implement snapshot_data_owned

  • Loading branch information...
Eijebong committed Aug 8, 2019
1 parent 97364dc commit 777ef4f3e834a08f95f3e2b715739121fdbc8c29
Showing with 8 additions and 1 deletion.
  1. +8 −1 components/canvas/raqote_backend.rs
@@ -373,8 +373,15 @@ impl GenericDrawTarget for raqote::DrawTarget {
)
})
}
#[allow(unsafe_code)]
fn snapshot_data_owned(&self) -> Vec<u8> {
unimplemented!();
let v = self.get_data();
unsafe {
std::slice::from_raw_parts(
v.as_ptr() as *const u8,
v.len() * std::mem::size_of::<u32>(),
).into()
}
}
}

0 comments on commit 777ef4f

Please sign in to comment.
You can’t perform that action at this time.