Commit: 505309f659d349c95c16297d5e6785f83764c740
Author: Clément Foucault
Date:   Sat Dec 1 20:15:23 2018 +0100
Branches: blender2.8
https://developer.blender.org/rB505309f659d349c95c16297d5e6785f83764c740

WM: Optimization: Don't clear the window color buffer

This is not needed and is rather costly.

Can be reverted if that causes problem.

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

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 00364489af7..d6058ac0d28 100644
--- a/source/blender/windowmanager/intern/wm_draw.c
+++ b/source/blender/windowmanager/intern/wm_draw.c
@@ -622,8 +622,14 @@ static void wm_draw_window_onscreen(bContext *C, wmWindow 
*win, int view)
 
        /* Draw into the window framebuffer, in full window coordinates. */
        wmWindowViewport(win);
+
+       /* We draw on all pixels of the windows so we don't need to clear them 
before.
+        * Actually this is only a problem when resizing the window.
+        * If it becomes a problem we should clear only when window size 
changes. */
+#if 0
        glClearColor(0, 0, 0, 0);
        glClear(GL_COLOR_BUFFER_BIT);
+#endif
 
        /* Blit non-overlapping area regions. */
        ED_screen_areas_iter(win, screen, sa) {

_______________________________________________
Bf-blender-cvs mailing list
[email protected]
https://lists.blender.org/mailman/listinfo/bf-blender-cvs

Reply via email to