Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorClément Foucault <foucault.clem@gmail.com>2018-12-01 22:15:23 +0300
committerClément Foucault <foucault.clem@gmail.com>2018-12-01 22:38:52 +0300
commit505309f659d349c95c16297d5e6785f83764c740 (patch)
tree2b90ec5e5f280fc7a1bfdd3f5a21178359f20621 /source/blender/windowmanager/intern/wm_draw.c
parentd55c269dd197288c30ca2881136330931bf05f98 (diff)
WM: Optimization: Don't clear the window color buffer
This is not needed and is rather costly. Can be reverted if that causes problem.
Diffstat (limited to 'source/blender/windowmanager/intern/wm_draw.c')
-rw-r--r--source/blender/windowmanager/intern/wm_draw.c6
1 files changed, 6 insertions, 0 deletions
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) {