Add a Buffer::age() method

Fixes https://github.com/rust-windowing/softbuffer/issues/90.
This commit is contained in:
Ian Douglas Scott 2023-04-20 18:52:34 -07:00
parent c1d6716eec
commit 29b3f4a978
8 changed files with 126 additions and 20 deletions

View file

@ -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(