mirror of
https://github.com/rust-windowing/winit.git
synced 2026-06-26 22:53:15 -04:00
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:
@@ -33,6 +33,8 @@ fn main() -> Result<(), impl std::error::Error> {
|
||||
window.request_redraw();
|
||||
}
|
||||
Event::RedrawRequested(_) => {
|
||||
// Notify the windowing system that we'll be presenting to the window.
|
||||
window.pre_present_notify();
|
||||
fill::fill_window(&window);
|
||||
}
|
||||
_ => (),
|
||||
|
||||
Reference in New Issue
Block a user