[Bf-blender-cvs] [d0d9360a666] master: Fix T52800: fix UI flickering with Mesa on Linux.

Brecht Van Lommel noreply at git.blender.org
Mon Sep 18 13:22:41 CEST 2017


Commit: d0d9360a6663efb16e4fbc35554be61bf54630e3
Author: Brecht Van Lommel
Date:   Mon Sep 18 13:12:36 2017 +0200
Branches: master
https://developer.blender.org/rBd0d9360a6663efb16e4fbc35554be61bf54630e3

Fix T52800: fix UI flickering with Mesa on Linux.

Use triple buffer by default now on all platforms, remaing ones where:
* Mesa: seems to have been working well for a long time now, and not using
  it gives issues with the latest Mesa 17.2.0.
* Windows software OpenGL: no longer supported since OpenGL 2.1 requirement
  was introduced.
* OS X with thousands of colors: this option was removed in OS X 10.6, and
  that's our minimum requirement.

===================================================================

M	source/blender/windowmanager/intern/wm_draw.c

===================================================================

diff --git a/source/blender/windowmanager/intern/wm_draw.c b/source/blender/windowmanager/intern/wm_draw.c
index 25c6980f58e..2b695c95258 100644
--- a/source/blender/windowmanager/intern/wm_draw.c
+++ b/source/blender/windowmanager/intern/wm_draw.c
@@ -867,25 +867,13 @@ static bool wm_draw_update_test_window(wmWindow *win)
 
 static int wm_automatic_draw_method(wmWindow *win)
 {
-	/* Ideally all cards would work well with triple buffer, since if it works
-	 * well gives the least redraws and is considerably faster at partial redraw
-	 * for sculpting or drawing overlapping menus. For typically lower end cards
-	 * copy to texture is slow though and so we use overlap instead there. */
-
+	/* We assume all supported GPUs now support triple buffer well. */
 	if (win->drawmethod == USER_DRAW_AUTOMATIC) {
-		/* Windows software driver darkens color on each redraw */
-		if (GPU_type_matches(GPU_DEVICE_SOFTWARE, GPU_OS_WIN, GPU_DRIVER_SOFTWARE))
-			return USER_DRAW_OVERLAP_FLIP;
-		else if (GPU_type_matches(GPU_DEVICE_SOFTWARE, GPU_OS_UNIX, GPU_DRIVER_SOFTWARE))
-			return USER_DRAW_OVERLAP;
-		/* drawing lower color depth again degrades colors each time */
-		else if (GPU_color_depth() < 24)
-			return USER_DRAW_OVERLAP;
-		else
-			return USER_DRAW_TRIPLE;
+		return USER_DRAW_TRIPLE;
 	}
-	else
+	else {
 		return win->drawmethod;
+	}
 }
 
 bool WM_is_draw_triple(wmWindow *win)



More information about the Bf-blender-cvs mailing list