Jacek Caban : winex11: Don't use pPolygon graphics driver entry point.
Alexandre Julliard
julliard at winehq.org
Thu Jul 22 16:28:19 CDT 2021
Module: wine
Branch: master
Commit: 3a7c1630ea8fedb2ff717762f42b2a4eda39c68a
URL: https://source.winehq.org/git/wine.git/?a=commit;h=3a7c1630ea8fedb2ff717762f42b2a4eda39c68a
Author: Jacek Caban <jacek at codeweavers.com>
Date: Thu Jul 22 11:25:30 2021 +0200
winex11: Don't use pPolygon graphics driver entry point.
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/winex11.drv/graphics.c | 4 +++-
dlls/winex11.drv/init.c | 2 +-
dlls/winex11.drv/x11drv.h | 1 -
3 files changed, 4 insertions(+), 3 deletions(-)
diff --git a/dlls/winex11.drv/graphics.c b/dlls/winex11.drv/graphics.c
index 77ca60ec44d..e2b8b9d3233 100644
--- a/dlls/winex11.drv/graphics.c
+++ b/dlls/winex11.drv/graphics.c
@@ -1074,7 +1074,7 @@ BOOL CDECL X11DRV_PaintRgn( PHYSDEV dev, HRGN hrgn )
/**********************************************************************
* X11DRV_Polygon
*/
-BOOL CDECL X11DRV_Polygon( PHYSDEV dev, const POINT* pt, INT count )
+static BOOL X11DRV_Polygon( PHYSDEV dev, const POINT* pt, INT count )
{
X11DRV_PDEVICE *physDev = get_x11drv_dev( dev );
int i;
@@ -1123,6 +1123,8 @@ BOOL CDECL X11DRV_PolyPolygon( PHYSDEV dev, const POINT* pt, const INT* counts,
POINT *points;
BOOL ret = FALSE;
+ if (polygons == 1) return X11DRV_Polygon( dev, pt, *counts );
+
for (i = 0; i < polygons; i++)
{
if (counts[i] < 2) return FALSE;
diff --git a/dlls/winex11.drv/init.c b/dlls/winex11.drv/init.c
index ff3d5317697..66603d2a240 100644
--- a/dlls/winex11.drv/init.c
+++ b/dlls/winex11.drv/init.c
@@ -416,7 +416,7 @@ static const struct gdi_dc_funcs x11drv_funcs =
NULL, /* pPolyDraw */
X11DRV_PolyPolygon, /* pPolyPolygon */
X11DRV_PolyPolyline, /* pPolyPolyline */
- X11DRV_Polygon, /* pPolygon */
+ NULL, /* pPolygon */
NULL, /* pPolyline */
NULL, /* pPolylineTo */
X11DRV_PutImage, /* pPutImage */
diff --git a/dlls/winex11.drv/x11drv.h b/dlls/winex11.drv/x11drv.h
index c23cd512eb9..e14e131d819 100644
--- a/dlls/winex11.drv/x11drv.h
+++ b/dlls/winex11.drv/x11drv.h
@@ -168,7 +168,6 @@ extern BOOL CDECL X11DRV_PaintRgn( PHYSDEV dev, HRGN hrgn ) DECLSPEC_HIDDEN;
extern BOOL CDECL X11DRV_PatBlt( PHYSDEV dev, struct bitblt_coords *dst, DWORD rop ) DECLSPEC_HIDDEN;
extern BOOL CDECL X11DRV_Pie( PHYSDEV dev, INT left, INT top, INT right,
INT bottom, INT xstart, INT ystart, INT xend, INT yend ) DECLSPEC_HIDDEN;
-extern BOOL CDECL X11DRV_Polygon( PHYSDEV dev, const POINT* pt, INT count ) DECLSPEC_HIDDEN;
extern BOOL CDECL X11DRV_PolyPolygon( PHYSDEV dev, const POINT* pt, const INT* counts, UINT polygons) DECLSPEC_HIDDEN;
extern BOOL CDECL X11DRV_PolyPolyline( PHYSDEV dev, const POINT* pt, const DWORD* counts, DWORD polylines) DECLSPEC_HIDDEN;
extern DWORD CDECL X11DRV_PutImage( PHYSDEV dev, HRGN clip, BITMAPINFO *info,
More information about the wine-cvs
mailing list