1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-25 20:27:45 +00:00

WindowServer: When "flash flush" is enabled, stretch flash to 10 ms

Previously, this mode would flash flush/repaint rects in yellow for
however it long it took for the compositor to replace the yellow with
the final image instead.

Now we usleep() for 10 ms when flashing, so you get a chance to see
the yellow. This immediately makes "flash flush" mode super useful. :^)
This commit is contained in:
Andreas Kling 2021-07-07 22:39:05 +02:00
parent 795786387b
commit 6032b2cb2b

View file

@ -593,6 +593,7 @@ void Compositor::flush(Screen& screen)
if (m_flash_flush) {
for (auto& rect : screen_data.m_flush_rects.rects())
screen_data.m_front_painter->fill_rect(rect, Color::Yellow);
usleep(10000);
}
auto screen_rect = screen.rect();