From 014cdd3441be1adfb90ec3742bd2c12927cd20bd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Cl=C3=A9ment=20Foucault?= Date: Sat, 7 May 2022 17:38:05 +0200 Subject: Fix T97600 Regression: rendering in new window displays flickers This is because some drivers / GPU actually still do double buffer swapping but others don't. Adding this do ensure the background color of the first redraw. Note that this fix was not tested on the problematic hardware and might not solve the issue. --- source/blender/windowmanager/intern/wm_window.c | 3 +++ 1 file changed, 3 insertions(+) (limited to 'source/blender') diff --git a/source/blender/windowmanager/intern/wm_window.c b/source/blender/windowmanager/intern/wm_window.c index 382a37e09e5..c0427f9be9a 100644 --- a/source/blender/windowmanager/intern/wm_window.c +++ b/source/blender/windowmanager/intern/wm_window.c @@ -578,6 +578,9 @@ static void wm_window_ghostwindow_add(wmWindowManager *wm, wm_window_swap_buffers(win); + /* Clear double buffer to avoids flickering of new windows on certain drivers. (See T97600) */ + GPU_clear_color(0.55f, 0.55f, 0.55f, 1.0f); + // GHOST_SetWindowState(ghostwin, GHOST_kWindowStateModified); } else { -- cgit v1.2.3