From 4a32b33ce1558088a8cff8de41f5ce4b7ff26baf Mon Sep 17 00:00:00 2001 From: Mike Griese Date: Mon, 20 Apr 2020 09:01:24 -0500 Subject: [PATCH] Fix blanking vim on a settings update --- src/renderer/dx/DxRenderer.cpp | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/renderer/dx/DxRenderer.cpp b/src/renderer/dx/DxRenderer.cpp index 654c71846c0..432fd9c2e1c 100644 --- a/src/renderer/dx/DxRenderer.cpp +++ b/src/renderer/dx/DxRenderer.cpp @@ -1178,7 +1178,12 @@ try D2D1_COLOR_F nothing = { 0 }; // If the entire thing is invalid, just use one big clear operation. - if (_invalidMap.all()) + // Don't use _invalidMap.all() here. That method checks if the union of the + // invalid areas of the map is the entire frame. However, there's a good + // chance that _not_ all the cells of the frame are actually invalid. If we + // used all() here, we'd clear the entire frame, but not actually paint all + // the cells again. + if (_firstFrame) { _d2dRenderTarget->Clear(nothing); }