Skip to content

Commit

Permalink
Implement snapshot_data_owned
Browse files Browse the repository at this point in the history
  • Loading branch information
Eijebong committed Aug 21, 2019
1 parent 97364dc commit 777ef4f
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion components/canvas/raqote_backend.rs
Expand Up @@ -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()
}
}
}

Expand Down

0 comments on commit 777ef4f

Please sign in to comment.