Jacek Caban : gdi32: Use NtGdiArcInternal for Pie implementation.

Alexandre Julliard julliard at winehq.org
Mon Jul 19 15:59:15 CDT 2021


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

Author: Jacek Caban <jacek at codeweavers.com>
Date:   Sat Jul 17 16:57:25 2021 +0200

gdi32: Use NtGdiArcInternal for Pie 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    | 13 +++++++++++++
 dlls/gdi32/painting.c | 28 ++++++----------------------
 2 files changed, 19 insertions(+), 22 deletions(-)

diff --git a/dlls/gdi32/gdidc.c b/dlls/gdi32/gdidc.c
index 0123ed8f525..b2bddc717ae 100644
--- a/dlls/gdi32/gdidc.c
+++ b/dlls/gdi32/gdidc.c
@@ -80,3 +80,16 @@ BOOL WINAPI Chord( HDC hdc, INT left, INT top, INT right, INT bottom,
     return NtGdiArcInternal( NtGdiChord, hdc, left, top, right, bottom,
                              xstart, ystart, xend, yend );
 }
+
+/***********************************************************************
+ *           Pie   (GDI32.@)
+ */
+BOOL WINAPI Pie( HDC hdc, INT left, INT top, INT right, INT bottom,
+                 INT xstart, INT ystart, INT xend, INT yend )
+{
+    TRACE( "%p, (%d, %d)-(%d, %d), (%d, %d), (%d, %d)\n", hdc, left, top,
+           right, bottom, xstart, ystart, xend, yend );
+
+    return NtGdiArcInternal( NtGdiPie, hdc, left, top, right, bottom,
+                             xstart, ystart, xend, yend );
+}
diff --git a/dlls/gdi32/painting.c b/dlls/gdi32/painting.c
index f34570cf1ff..4a9bb48db8b 100644
--- a/dlls/gdi32/painting.c
+++ b/dlls/gdi32/painting.c
@@ -322,6 +322,12 @@ BOOL WINAPI NtGdiArcInternal( UINT type, HDC hdc, INT left, INT top, INT right,
                                       xstart, ystart, xend, yend );
         break;
 
+    case NtGdiPie:
+        physdev = GET_DC_PHYSDEV( dc, pPie );
+        ret = physdev->funcs->pPie( physdev, left, top, right, bottom,
+                                    xstart, ystart, xend, yend );
+        break;
+
     default:
         WARN( "invalid arc type %u\n", type );
         ret = FALSE;
@@ -332,28 +338,6 @@ BOOL WINAPI NtGdiArcInternal( UINT type, HDC hdc, INT left, INT top, INT right,
 }
 
 
-/***********************************************************************
- *           Pie   (GDI32.@)
- */
-BOOL WINAPI Pie( HDC hdc, INT left, INT top,
-                     INT right, INT bottom, INT xstart, INT ystart,
-                     INT xend, INT yend )
-{
-    BOOL ret;
-    PHYSDEV physdev;
-    DC * dc = get_dc_ptr( hdc );
-
-    TRACE( "%p, (%d, %d)-(%d, %d), (%d, %d), (%d, %d)\n", hdc, left, top, right, bottom, xstart, ystart, xend, yend );
-
-    if (!dc) return FALSE;
-    update_dc( dc );
-    physdev = GET_DC_PHYSDEV( dc, pPie );
-    ret = physdev->funcs->pPie( physdev, left, top, right, bottom, xstart, ystart, xend, yend );
-    release_dc_ptr( dc );
-    return ret;
-}
-
-
 /***********************************************************************
  *           Ellipse    (GDI32.@)
  */




More information about the wine-cvs mailing list