From fac6d220c3bb787e4f8a64caeaee9db44327ac54 Mon Sep 17 00:00:00 2001 From: Andreas Kling Date: Tue, 26 Oct 2021 00:11:16 +0200 Subject: [PATCH] WindowServer: Don't re-open screen device immediately after opening it The Screen constructor already calls open_device(), so there's no need to call it again right after creating a new Screen in apply_layout(). This makes the first screen compose happen ~50ms earlier on my machine. --- Userland/Services/WindowServer/Screen.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Userland/Services/WindowServer/Screen.cpp b/Userland/Services/WindowServer/Screen.cpp index 1ee5ff4044..ea6bee2af5 100644 --- a/Userland/Services/WindowServer/Screen.cpp +++ b/Userland/Services/WindowServer/Screen.cpp @@ -145,7 +145,7 @@ bool Screen::apply_layout(ScreenLayout&& screen_layout, String& error_msg) return false; } - need_to_open_device = true; + need_to_open_device = false; } if (need_to_open_device && !screen->open_device()) {