On Web, use requestAnimationFrame for RedrawRequested

This commit is contained in:
dAxpeDDa 2023-06-23 16:21:41 +02:00 committed by Kirill Chibisov
parent 7a58fe58ce
commit 57fad2ce15
7 changed files with 87 additions and 10 deletions

View file

@ -547,6 +547,7 @@ impl Window {
/// - **iOS:** Can only be called on the main thread.
/// - **Wayland:** The events are aligned with the frame callbacks when [`Window::pre_present_notify`]
/// is used.
/// - **Web:** [`Event::RedrawRequested`] will be aligned with the `requestAnimationFrame`.
///
/// [`Event::RedrawRequested`]: crate::event::Event::RedrawRequested
#[inline]