From 6032b2cb2b7111e962c47d9dd458be8eba25c093 Mon Sep 17 00:00:00 2001 From: Andreas Kling Date: Wed, 7 Jul 2021 22:39:05 +0200 Subject: [PATCH] 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. :^) --- Userland/Services/WindowServer/Compositor.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/Userland/Services/WindowServer/Compositor.cpp b/Userland/Services/WindowServer/Compositor.cpp index 32cd034087..932429fd8d 100644 --- a/Userland/Services/WindowServer/Compositor.cpp +++ b/Userland/Services/WindowServer/Compositor.cpp @@ -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();