Jacek Caban : gdi32: Use NtGdiSetPixelFormat for GdiSetPixelFormat implementation.

Alexandre Julliard julliard at winehq.org
Mon Jul 26 15:30:27 CDT 2021


Module: wine
Branch: master
Commit: 275325686273a2c6332e95adcd3734fbae06c6d7
URL:    https://source.winehq.org/git/wine.git/?a=commit;h=275325686273a2c6332e95adcd3734fbae06c6d7

Author: Jacek Caban <jacek at codeweavers.com>
Date:   Sun Jul 25 10:55:31 2021 +0200

gdi32: Use NtGdiSetPixelFormat for GdiSetPixelFormat implementation.

Signed-off-by: Jacek Caban <jacek at codeweavers.com>
Signed-off-by: Huw Davies <huw at codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>

---

 dlls/gdi32/gdidc.c    | 9 +++++++++
 dlls/gdi32/painting.c | 6 ++----
 include/ntgdi.h       | 2 +-
 3 files changed, 12 insertions(+), 5 deletions(-)

diff --git a/dlls/gdi32/gdidc.c b/dlls/gdi32/gdidc.c
index 74280bc34b5..209591ad0c2 100644
--- a/dlls/gdi32/gdidc.c
+++ b/dlls/gdi32/gdidc.c
@@ -444,3 +444,12 @@ BOOL WINAPI CloseFigure( HDC hdc )
     if (dc_attr->emf && !EMFDC_CloseFigure( dc_attr )) return FALSE;
     return NtGdiCloseFigure( hdc );
 }
+
+/***********************************************************************
+ *           GdiSetPixelFormat   (GDI32.@)
+ */
+BOOL WINAPI GdiSetPixelFormat( HDC hdc, INT format, const PIXELFORMATDESCRIPTOR *descr )
+{
+    TRACE( "(%p,%d,%p)\n", hdc, format, descr );
+    return NtGdiSetPixelFormat( hdc, format );
+}
diff --git a/dlls/gdi32/painting.c b/dlls/gdi32/painting.c
index c879aeb9582..725a8490f39 100644
--- a/dlls/gdi32/painting.c
+++ b/dlls/gdi32/painting.c
@@ -434,17 +434,15 @@ COLORREF WINAPI NtGdiGetPixel( HDC hdc, INT x, INT y )
 
 
 /******************************************************************************
- * GdiSetPixelFormat [GDI32.@]
+ *           NtGdiSetPixelFormat  (win32u.@)
  *
  * Probably not the correct semantics, it's supposed to be an internal backend for SetPixelFormat.
  */
-BOOL WINAPI GdiSetPixelFormat( HDC hdc, INT format, const PIXELFORMATDESCRIPTOR *descr )
+BOOL WINAPI NtGdiSetPixelFormat( HDC hdc, INT format )
 {
     DC *dc;
     BOOL ret = TRUE;
 
-    TRACE("(%p,%d,%p)\n", hdc, format, descr);
-
     if (!(dc = get_dc_ptr( hdc ))) return FALSE;
 
     if (!dc->pixel_format) dc->pixel_format = format;
diff --git a/include/ntgdi.h b/include/ntgdi.h
index 2cf0a6f681e..a85fec66723 100644
--- a/include/ntgdi.h
+++ b/include/ntgdi.h
@@ -220,7 +220,7 @@ DWORD    WINAPI NtGdiSetLayout( HDC hdc, DWORD layout );
 INT      WINAPI NtGdiSetMetaRgn( HDC hdc );
 BOOL     WINAPI NtGdiSetMiterLimit( HDC hdc, FLOAT limit, FLOAT *prev_limit );
 COLORREF WINAPI NtGdiSetPixel( HDC hdc, INT x, INT y, COLORREF color );
-BOOL     WINAPI NtGdiSetPixelFormat( HDC hdc, INT format, const PIXELFORMATDESCRIPTOR *descr );
+BOOL     WINAPI NtGdiSetPixelFormat( HDC hdc, INT format );
 BOOL     WINAPI NtGdiSetRectRgn( HRGN hrgn, INT left, INT top, INT right, INT bottom );
 BOOL     WINAPI NtGdiSetTextJustification( HDC hdc, INT extra, INT breaks );
 BOOL     WINAPI NtGdiSetVirtualResolution( HDC hdc, DWORD horz_res, DWORD vert_res,




More information about the wine-cvs mailing list