From c5397f9cf2b34f9c21bc4606d9a3c31da97d1eff Mon Sep 17 00:00:00 2001 From: "Evgeny Grechnikov (Diamond)" Date: Sun, 30 May 2010 18:19:10 +0000 Subject: [PATCH] optimize set_window_box: do nothing if new box is the same as old one git-svn-id: svn://kolibrios.org@1474 a494cfbc-eb01-0410-851d-a64ba20cac60 --- kernel/trunk/gui/window.inc | 14 ++++++++++++++ kernel/trunk/kernel.asm | 2 +- 2 files changed, 15 insertions(+), 1 deletion(-) diff --git a/kernel/trunk/gui/window.inc b/kernel/trunk/gui/window.inc index 12f053cb16..7194f2e8a5 100644 --- a/kernel/trunk/gui/window.inc +++ b/kernel/trunk/gui/window.inc @@ -1288,6 +1288,20 @@ window._.set_window_box: ;///////////////////////////////////////////////////// ;------------------------------------------------------------------------------ push eax ebx esi +; don't do anything if the new box is identical to the old + cmp bl, [edi + WDATA.fl_wstate] + jnz @f + mov esi, eax + push edi +if WDATA.box + add edi, WDATA.box +end if + mov ecx, 4 + repz cmpsd + pop edi + jz .exit +@@: + add esp, -BOX.sizeof mov ebx, esp diff --git a/kernel/trunk/kernel.asm b/kernel/trunk/kernel.asm index 96259eb493..dd98205201 100644 --- a/kernel/trunk/kernel.asm +++ b/kernel/trunk/kernel.asm @@ -3226,7 +3226,7 @@ redrawscreen: bgli: - cmp ecx,1 + cmp dword[esp], 1 jnz .az ; cmp byte[BACKGROUND_CHANGED], 0 ; jnz newdw8