mirror of
https://github.com/servo/servo.git
synced 2025-08-03 04:30:10 +01:00
Implement snapshot_data_owned
This commit is contained in:
parent
97364dc6af
commit
777ef4f3e8
1 changed files with 8 additions and 1 deletions
|
@ -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()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue