mirror of
https://github.com/servo/servo
synced 2026-05-13 18:37:30 +02:00
Currently, the `RefreshDriver` creates a timer thread by default to limit the frame rate of animations to within 120fps. However, some platforms have already integrated `VSYNC` and even support `LTPO`, making the refresh rate of the current `RefreshDriver` mismatched with the display refresh rate of the platform. The main idea of this PR is to introduce the `BeginFrameSource` and `BeginFrameSourceObserver` types, allowing `VSYNC` to be integrated into the RefreshDriver. Testing: It's hard to test rendering rate but some manual tests show that it takes effect on OHOS platform, and other behavior is covered by existing WPT tests. --------- Signed-off-by: sharpshooter_pt <ibluegalaxy_taoj@163.com> Signed-off-by: Martin Robinson <mrobinson@igalia.com> Co-authored-by: Martin Robinson <mrobinson@igalia.com>