OSDN Git Service

declare xlibMaxLinePoints as static constant
authorIvailo Monev <xakepa10@gmail.com>
Sat, 29 Jan 2022 21:36:24 +0000 (23:36 +0200)
committerIvailo Monev <xakepa10@gmail.com>
Sat, 29 Jan 2022 21:36:24 +0000 (23:36 +0200)
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
src/gui/painting/qpaintengine_x11.cpp
src/gui/painting/qpaintengine_x11_p.h

index c1f3dfa..ea934f3 100644 (file)
@@ -412,7 +412,6 @@ bool QX11PaintEngine::begin(QPaintDevice *pdev)
 #if !defined(QT_NO_XRENDER)
     d->composition_mode = PictOpOver;
 #endif
-    d->xlibMaxLinePoints = 32762; // a safe number used to avoid, call to XMaxRequestSize(d->dpy) - 3;
     d->opacity = 1;
 
     // Set up the polygon clipper. Note: This will only work in
@@ -1016,6 +1015,9 @@ void QX11PaintEnginePrivate::fillPolygon_dev(const QPointF *polygonPoints, int p
 
 void QX11PaintEnginePrivate::strokePolygon_dev(const QPointF *polygonPoints, int pointCount, bool close)
 {
+    // a safe number used to avoid, call to XMaxRequestSize(d->dpy) - 3;
+    static const int xlibMaxLinePoints = 32762;
+
     int clippedCount = 0;
     QPointF *clippedPoints = nullptr;
     polygonClipper.clipPolygon(polygonPoints, pointCount,
index c2ddcf8..a722e42 100644 (file)
@@ -170,7 +170,6 @@ public:
     qreal xform_scale;
     QPolygonClipper polygonClipper;
 
-    int xlibMaxLinePoints;
 #ifndef QT_NO_XRENDER
     QXRenderTessellator *tessellator;
 #endif