From 83c504b87cfa9f3ae6ace11d9a7ce13308c9be7b Mon Sep 17 00:00:00 2001 From: "Artem Jerdev (art_zh)" Date: Fri, 13 May 2011 13:11:10 +0000 Subject: [PATCH] just a minor optimisation git-svn-id: svn://kolibrios.org@1930 a494cfbc-eb01-0410-851d-a64ba20cac60 --- kernel/branches/Kolibri-A/trunk/data32.inc | 32 ++++++------- .../branches/Kolibri-A/trunk/gui/window.inc | 2 +- kernel/branches/Kolibri-A/trunk/kernel.asm | 45 ++++--------------- 3 files changed, 25 insertions(+), 54 deletions(-) diff --git a/kernel/branches/Kolibri-A/trunk/data32.inc b/kernel/branches/Kolibri-A/trunk/data32.inc index 51a8e456de..2a1f038c19 100644 --- a/kernel/branches/Kolibri-A/trunk/data32.inc +++ b/kernel/branches/Kolibri-A/trunk/data32.inc @@ -315,22 +315,22 @@ srv.fd rd 1 srv.bk rd 1 -align 64 -img_draw_core_fn rd 1 ; putimage variables & helpers -img_draw_edge_fn rd 1 -img_lfb_origin rd 1 -img_buf_origin rd 1 -img_buf_line_size rd 1 -img_palette rd 1 -img_bitoffset rd 1 -img_edgeoffset rd 1 -img_bytes_per_pix rd 1 -img_map_right rd 1 -img_map_x rd 1 -img_pix_x rd 1 ; real Xsize -img_pix_y rd 1 ; real Ysize -img_screen_x rd 1 -img_screen_y rd 1 +;align 64 +;img_draw_core_fn rd 1 ; putimage variables & helpers +;img_draw_edge_fn rd 1 +;img_lfb_origin rd 1 +;img_buf_origin rd 1 +;img_buf_line_size rd 1 +;img_palette rd 1 +;img_bitoffset rd 1 +;img_edgeoffset rd 1 +;img_bytes_per_pix rd 1 +;img_map_right rd 1 +;img_map_x rd 1 +;img_pix_x rd 1 ; real Xsize +;img_pix_y rd 1 ; real Ysize +;img_screen_x rd 1 +;img_screen_y rd 1 align 64 ;_WinMapWidth rd 1 diff --git a/kernel/branches/Kolibri-A/trunk/gui/window.inc b/kernel/branches/Kolibri-A/trunk/gui/window.inc index c4b8cbce7a..a1262eb424 100644 --- a/kernel/branches/Kolibri-A/trunk/gui/window.inc +++ b/kernel/branches/Kolibri-A/trunk/gui/window.inc @@ -1632,7 +1632,7 @@ window._.set_screen: ;///////////////////////////////////////////////////////// ; get WinMap start push esi - mov edi, [Screen_Max_X] + mov edi, [_display.width] ; = ([Screen_Max_X] + 1) mov esi, edi imul edi, ebx add edi, eax diff --git a/kernel/branches/Kolibri-A/trunk/kernel.asm b/kernel/branches/Kolibri-A/trunk/kernel.asm index a23862d9a7..9e58d73cfc 100644 --- a/kernel/branches/Kolibri-A/trunk/kernel.asm +++ b/kernel/branches/Kolibri-A/trunk/kernel.asm @@ -727,6 +727,7 @@ end if mov esi,boot_setmouse call boot_log ; call setmouse +; mov [MOUSE_PICTURE],dword mousepointer cli ; STACK AND FDC @@ -3208,23 +3209,13 @@ drawbackground: ; call [draw_pointer] ; ret inc [mouse_pause] - cmp [SCR_MODE],word 0x12 - je dbrv20 - dbrv12: - cmp [SCR_MODE],word 0100000000000000b - jge dbrv20 - dec [mouse_pause] - call [draw_pointer] - ret - dbrv20: cmp [BgrDrawMode],dword 1 - jne bgrstr + jne .bgrstr call vesa20_drawbackground_tiled - dec [mouse_pause] - call [draw_pointer] - ret - bgrstr: + jmp @f +.bgrstr: call vesa20_drawbackground_stretch +@@: dec [mouse_pause] call [draw_pointer] ret @@ -3653,8 +3644,7 @@ __sys_drawbar: add edx,[esi+APPDATA.wnd_clientbox.top] .forced: inc [mouse_pause] -; dbv20: - call drawbar + call vesa20_drawbar dec [mouse_pause] jmp [draw_pointer] @@ -3757,25 +3747,6 @@ kb_cmd: ret -;setmouse: ; set mousepicture -pointer - ; ps2 mouse enable - -; mov [MOUSE_PICTURE],dword mousepointer -; cli -; ret - -;if used _rdtsc -;_rdtsc: -; bt [cpu_caps], CAPS_TSC -; jnc ret_rdtsc -; rdtsc -; ret -; ret_rdtsc: -; mov edx,0xffffffff -; mov eax,0xffffffff -; ret -;end if - rerouteirqs: cli @@ -4096,8 +4067,8 @@ syscall_setpixel: ; SetPixel mov ebx, ecx mov ecx, edx xor edi, edi ; no force -; call [_display.disable_mouse] - jmp __sys_putpixel + call [_display.disable_mouse] + jmp [putpixel] align 4