Subversion Repositories Kolibri OS

Rev

Rev 5154 | Rev 5164 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 5154 Rev 5161
Line 3... Line 3...
3
;; Copyright (C) KolibriOS team 2011-2014. All rights reserved. ;;
3
;; Copyright (C) KolibriOS team 2011-2014. All rights reserved. ;;
4
;; Distributed under terms of the GNU General Public License    ;;
4
;; Distributed under terms of the GNU General Public License    ;;
5
;;                                                              ;;
5
;;                                                              ;;
6
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
6
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
Line 7... Line 7...
7
 
7
 
Line 8... Line 8...
8
$Revision: 5154 $
8
$Revision: 5161 $
9
 
9
 
10
 
10
 
Line 400... Line 400...
400
        pop     edi
400
        pop     edi
401
        pop     ebp
401
        pop     ebp
402
        ret
402
        ret
Line 403... Line 403...
403
 
403
 
-
 
404
.core_24:
-
 
405
        cmp     [_display.bits_per_pixel], 24
-
 
406
        jne     .core_16
404
.core_24:
407
 
405
        lea     ebx, [ebx+ebx*2]
408
        lea     ebx, [ebx+ebx*2]
406
        lea     edi, [LFB_BASE+edi+ebx]
409
        lea     edi, [LFB_BASE+edi+ebx]
Line 407... Line 410...
407
        mov     ebx, [CURRENT_TASK]
410
        mov     ebx, [CURRENT_TASK]
Line 411... Line 414...
411
        mov     [esp+.extra_var1], edi
414
        mov     [esp+.extra_var1], edi
412
        xor     ecx, ecx
415
        xor     ecx, ecx
Line 413... Line 416...
413
 
416
 
414
align 4
417
align 4
415
.inner24:
418
.inner24:
416
        cmp     [ebp+ecx], bl
419
        cmp     [ebp+ecx], bl           ; Does the process own this pixel?
417
        jne     .skip_1
420
        jne     .skip_1
418
;--------------------------------------
421
;--------------------------------------
419
        push    eax
422
        push    eax
Line 463... Line 466...
463
        mov     edx, [esp+BLITTER.w]
466
        mov     edx, [esp+BLITTER.w]
464
        dec     [esp+BLITTER.h]
467
        dec     [esp+BLITTER.h]
465
        jnz     .outer24
468
        jnz     .outer24
Line 466... Line 469...
466
 
469
 
-
 
470
        jmp     .done
-
 
471
 
-
 
472
 
-
 
473
 
-
 
474
.core_16:
-
 
475
        lea     edi, [LFB_BASE+edi+ebx*2]
-
 
476
        mov     ebx, [CURRENT_TASK]
-
 
477
 
-
 
478
align 4
-
 
479
.outer16:
-
 
480
        mov     [esp+.extra_var1], edi
-
 
481
        xor     ecx, ecx
-
 
482
 
-
 
483
align 4
-
 
484
.inner16:
-
 
485
        cmp     [ebp+ecx], bl                   ; Does the process own this pixel?
-
 
486
        jne     .skip_2
-
 
487
;--------------------------------------
-
 
488
        push    eax
-
 
489
        mov     eax, [esi+ecx*4]
-
 
490
 
-
 
491
; check for hardware cursor
-
 
492
        cmp     [_display.select_cursor], select_cursor
-
 
493
        je      @f
-
 
494
        cmp     [_display.select_cursor], 0
-
 
495
        jne     .no_mouseunder_2
-
 
496
;--------------------------------------
-
 
497
align 4
-
 
498
@@:
-
 
499
        push    ecx
-
 
500
 
-
 
501
        mov     ecx, [esp+4]
-
 
502
        ror     ecx, 16
-
 
503
        sub     ecx, edx
-
 
504
        rol     ecx, 16
-
 
505
        sub     ecx, [esp+BLITTER.h + 8]
-
 
506
 
-
 
507
; check mouse area for putpixel
-
 
508
        call    [_display.check_mouse]
-
 
509
        pop     ecx
-
 
510
;--------------------------------------
-
 
511
align 4
-
 
512
.no_mouseunder_2:
-
 
513
; convert to 16 bpp and store to LFB
-
 
514
        and     eax, 00000000111110001111110011111000b
-
 
515
        shr     ah, 2
-
 
516
        shr     ax, 3
-
 
517
        ror     eax, 8
-
 
518
        add     al, ah
-
 
519
        rol     eax, 8
-
 
520
        mov     [edi+ecx*2], ax
-
 
521
        pop     eax
-
 
522
;--------------------------------------
-
 
523
align 4
-
 
524
.skip_2:
-
 
525
        mov     edi, [esp+.extra_var1]
-
 
526
        inc     ecx
-
 
527
        dec     edx
-
 
528
        jnz     .inner16
-
 
529
 
-
 
530
        add     esi, [esp+BLITTER.stride]
-
 
531
        add     edi, [_display.pitch]
-
 
532
        add     ebp, [_display.width]
-
 
533
 
-
 
534
        mov     edx, [esp+BLITTER.w]
-
 
535
        dec     [esp+BLITTER.h]
-
 
536
        jnz     .outer16
-
 
537
 
-
 
538
        jmp     .done