1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-25 23:37:35 +00:00

WSCompositor: Allow a compose to bypass the timer when it first happens

d66fa60fcf introduced the use of a timer
to coalesce screen updates. This is OK, but it does introduce update
latency.

To help mitigate the impact of this, we now have a second (immediate)
timer. When a compose pass is first triggered, the immediate timer will
allow the compose to happen on the next spin of the event loop (so, only
coalescing updates across a single event loop pass). Any updates that
trigger while the delayed timer is running, though, will be delayed to
that (~60fps) timer.

This fixes #103.
This commit is contained in:
Robin Burchell 2019-05-26 17:35:33 +02:00 committed by Andreas Kling
parent 8df3e2516f
commit 9b86eb9fad
3 changed files with 32 additions and 5 deletions

View file

@ -40,6 +40,7 @@ private:
unsigned m_compose_count { 0 };
unsigned m_flush_count { 0 };
CTimer m_compose_timer;
CTimer m_immediate_compose_timer;
bool m_flash_flush { false };
bool m_buffers_are_flipped { false };