Add a Buffer::age() method
Fixes https://github.com/rust-windowing/softbuffer/issues/90.
This commit is contained in:
parent
c1d6716eec
commit
29b3f4a978
8 changed files with 126 additions and 20 deletions
|
|
@ -87,6 +87,10 @@ impl<'a> BufferImpl<'a> {
|
|||
&mut self.buffer
|
||||
}
|
||||
|
||||
pub fn age(&self) -> u8 {
|
||||
0
|
||||
}
|
||||
|
||||
pub fn present(self) -> Result<(), SoftBufferError> {
|
||||
let data_provider = CGDataProvider::from_buffer(Arc::new(Buffer(self.buffer)));
|
||||
let image = CGImage::new(
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue