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
commit 6032b2cb2b
Notes: sideshowbarker 2024-07-18 10:08:04 +09:00

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();