https://git.reactos.org/?p=reactos.git;a=commitdiff;h=1dcdb4c2d0298ee71822c…
commit 1dcdb4c2d0298ee71822c1d432a30604a82bbd21
Author: Katayama Hirofumi MZ <katayama.hirofumi.mz(a)gmail.com>
AuthorDate: Thu Dec 5 20:19:00 2019 +0900
Commit: GitHub <noreply(a)github.com>
CommitDate: Thu Dec 5 20:19:00 2019 +0900
[WIN32SS][WINSRV] Optimize console background drawing (#2132)
Console needs speed. This PR will optimize drawing of console.
- Set NULL to the background brush.
- Skip WM_ERASEBKGND.
---
win32ss/user/winsrv/consrv/frontends/gui/conwnd.c | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/win32ss/user/winsrv/consrv/frontends/gui/conwnd.c
b/win32ss/user/winsrv/consrv/frontends/gui/conwnd.c
index 0d81e1d58b5..7676a99c22b 100644
--- a/win32ss/user/winsrv/consrv/frontends/gui/conwnd.c
+++ b/win32ss/user/winsrv/consrv/frontends/gui/conwnd.c
@@ -149,7 +149,7 @@ RegisterConWndClass(IN HINSTANCE hInstance)
WndClass.hIcon = ghDefaultIcon;
WndClass.hIconSm = ghDefaultIconSm;
WndClass.hCursor = ghDefaultCursor;
- WndClass.hbrBackground = (HBRUSH)GetStockObject(BLACK_BRUSH); // The color of a
terminal when it is switched off.
+ WndClass.hbrBackground = NULL;
WndClass.lpszMenuName = NULL;
WndClass.cbClsExtra = 0;
WndClass.cbWndExtra = GWLP_CONWND_ALLOC;
@@ -2214,6 +2214,9 @@ ConWndProc(HWND hWnd, UINT msg, WPARAM wParam, LPARAM lParam)
if (OnClose(GuiData)) goto Default;
break;
+ case WM_ERASEBKGND:
+ return TRUE;
+
case WM_PAINT:
OnPaint(GuiData);
break;