freetype-commit
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Git][freetype/freetype-demos][master] [graph/win32] Minor driver improv


From: Alexei Podtelezhnikov (@apodtele)
Subject: [Git][freetype/freetype-demos][master] [graph/win32] Minor driver improvements.
Date: Tue, 07 Feb 2023 04:40:12 +0000

Alexei Podtelezhnikov pushed to branch master at FreeType / FreeType Demo Programs

Commits:

  • a007661e
    by Alexei Podtelezhnikov at 2023-02-06T23:35:04-05:00
    [graph/win32] Minor driver improvements.
    
    * graph/win32/grwin32.c: (gr_win32_device_init): Do not set icon
    or background, which is covered anyway.
    (Message_Process) [WM_PAINT]: Paint only updated rectangle.
    

1 changed file:

Changes:

  • graph/win32/grwin32.c
    ... ... @@ -665,11 +665,19 @@ LRESULT CALLBACK Message_Process( HWND handle, UINT mess,
    665 665
             PAINTSTRUCT  ps;
    
    666 666
     
    
    667 667
             hDC = BeginPaint ( handle, &ps );
    
    668
    -        SetDIBitsToDevice( hDC, 0, 0,
    
    669
    -                           surface->root.bitmap.width,
    
    670
    -                           surface->root.bitmap.rows,
    
    671
    -                           0, 0, 0,
    
    672
    -                           surface->root.bitmap.rows,
    
    668
    +
    
    669
    +        LOG(( "WM_PAINT : ( %d %d %d %d )\n",
    
    670
    +              ps.rcPaint.left,  ps.rcPaint.top,
    
    671
    +              ps.rcPaint.right, ps.rcPaint.bottom ));
    
    672
    +
    
    673
    +        SetDIBitsToDevice( hDC,
    
    674
    +                           ps.rcPaint.left,
    
    675
    +                           ps.rcPaint.top,
    
    676
    +                           ps.rcPaint.right - ps.rcPaint.left,
    
    677
    +                           ps.rcPaint.bottom - ps.rcPaint.top,
    
    678
    +                           ps.rcPaint.left,
    
    679
    +                           surface->root.bitmap.rows - ps.rcPaint.bottom,
    
    680
    +                           0, surface->root.bitmap.rows,
    
    673 681
                                surface->shadow_bitmap.buffer,
    
    674 682
                                (LPBITMAPINFO)&surface->bmiHeader,
    
    675 683
                                DIB_RGB_COLORS );
    
    ... ... @@ -692,9 +700,9 @@ LRESULT CALLBACK Message_Process( HWND handle, UINT mess,
    692 700
           /* int     cbClsExtra   */ 0,
    
    693 701
           /* int     cbWndExtra   */ 0,
    
    694 702
           /* HANDLE  hInstance    */ GetModuleHandle( NULL ),
    
    695
    -      /* HICON   hIcon        */ LoadIcon( NULL, IDI_APPLICATION),
    
    703
    +      /* HICON   hIcon        */ NULL,
    
    696 704
           /* HCURSOR hCursor      */ LoadCursor( NULL, IDC_ARROW),
    
    697
    -      /* HBRUSH  hbrBackground*/ GetStockObject( LTGRAY_BRUSH ),
    
    705
    +      /* HBRUSH  hbrBackground*/ NULL,
    
    698 706
           /* LPCTSTR lpszMenuName */ NULL,
    
    699 707
           /* LPCTSTR lpszClassName*/ "FreeTypeTestGraphicDriver"
    
    700 708
         };
    


  • reply via email to

    [Prev in Thread] Current Thread [Next in Thread]