1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-31 05:28:11 +00:00

WindowServer+LibGUI: Notify DisplayLinks at 60 fps no matter what

The original implementation only sent out notifications when there was
something being drawn on screen. If nothing was going on, we'd get too
lazy and just not notify display links.

This obviously break requestAnimationFrame(), so now we just drive the
DisplayLinks at 60 fps no matter what. :^)
This commit is contained in:
Andreas Kling 2020-04-22 00:07:48 +02:00
parent 2d4c91df8e
commit 5326eebb1b
5 changed files with 47 additions and 2 deletions

View file

@ -75,6 +75,8 @@ private:
virtual void handle(const Messages::WindowClient::UpdateSystemTheme&) override;
virtual void handle(const Messages::WindowClient::WindowStateChanged&) override;
virtual void handle(const Messages::WindowClient::DisplayLinkNotification&) override;
bool m_display_link_notification_pending { false };
};
}