Add Window::on_present_notify to ack about drawing

That's a way to communicate to winit that you'll present to the window.
While it's a no-op for now, it'll be used to throttle drawing.
This commit is contained in:
Kirill Chibisov 2023-06-22 08:08:53 +04:00
parent 189a0080a6
commit 38f28d5836
12 changed files with 71 additions and 6 deletions

View file

@ -114,6 +114,8 @@ impl Window {
.dispatch(|inner| (inner.register_redraw_request)());
}
pub fn pre_present_notify(&self) {}
pub fn outer_position(&self) -> Result<PhysicalPosition<i32>, NotSupportedError> {
self.inner.queue(|inner| {
Ok(inner