Add a Buffer::present_with_damage() method
Supported on Wayland, X11, and Win32. Fixes https://github.com/rust-windowing/softbuffer/issues/39. try_for_each
This commit is contained in:
parent
f12aa534e1
commit
c1d6716eec
7 changed files with 186 additions and 78 deletions
|
|
@ -9,7 +9,7 @@ use web_sys::HtmlCanvasElement;
|
|||
use web_sys::ImageData;
|
||||
|
||||
use crate::error::SwResultExt;
|
||||
use crate::SoftBufferError;
|
||||
use crate::{Rect, SoftBufferError};
|
||||
use std::convert::TryInto;
|
||||
use std::num::NonZeroU32;
|
||||
|
||||
|
|
@ -153,6 +153,10 @@ impl<'a> BufferImpl<'a> {
|
|||
|
||||
Ok(())
|
||||
}
|
||||
|
||||
pub fn present_with_damage(self, _damage: &[Rect]) -> Result<(), SoftBufferError> {
|
||||
self.present()
|
||||
}
|
||||
}
|
||||
|
||||
#[inline(always)]
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue