summaryrefslogtreecommitdiffstats
path: root/src/gui/painting/qpaintengine_raster.cpp
diff options
context:
space:
mode:
authorJarek Kobus <jaroslaw.kobus@qt.io>2020-07-06 11:55:39 +0200
committerJarek Kobus <jaroslaw.kobus@qt.io>2020-07-07 20:35:05 +0200
commit471e4fcb226c4523efe93b1bdaf0db026495da94 (patch)
treebb963937b2446eb32d7632568433083a386f2c68 /src/gui/painting/qpaintengine_raster.cpp
parent7f400522c39f6a1abf083dc1af49ea3109635cc8 (diff)
Use QList instead of QVector in gui implementation
Task-number: QTBUG-84469 Change-Id: I366e845249203d80d640355a7780ac2f91a762f1 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io> Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
Diffstat (limited to 'src/gui/painting/qpaintengine_raster.cpp')
-rw-r--r--src/gui/painting/qpaintengine_raster.cpp14
1 files changed, 7 insertions, 7 deletions
diff --git a/src/gui/painting/qpaintengine_raster.cpp b/src/gui/painting/qpaintengine_raster.cpp
index b39d28e7b4..5c21f22df1 100644
--- a/src/gui/painting/qpaintengine_raster.cpp
+++ b/src/gui/painting/qpaintengine_raster.cpp
@@ -1667,7 +1667,7 @@ void QRasterPaintEngine::stroke(const QVectorPath &path, const QPen &pen)
qreal dashOffset = s->lastPen.dashOffset();
bool inDash = true;
qreal patternLength = 0;
- const QVector<qreal> pattern = s->lastPen.dashPattern();
+ const QList<qreal> pattern = s->lastPen.dashPattern();
for (int i = 0; i < pattern.size(); ++i)
patternLength += pattern.at(i);
@@ -1888,14 +1888,14 @@ static inline bool isAbove(const QPointF *a, const QPointF *b)
return a->y() < b->y();
}
-static bool splitPolygon(const QPointF *points, int pointCount, QVector<QPointF> *upper, QVector<QPointF> *lower)
+static bool splitPolygon(const QPointF *points, int pointCount, QList<QPointF> *upper, QList<QPointF> *lower)
{
Q_ASSERT(upper);
Q_ASSERT(lower);
Q_ASSERT(pointCount >= 2);
- QVector<const QPointF *> sorted;
+ QList<const QPointF *> sorted;
sorted.reserve(pointCount);
upper->reserve(pointCount * 3 / 4);
@@ -1911,7 +1911,7 @@ static bool splitPolygon(const QPointF *points, int pointCount, QVector<QPointF>
const QPointF *end = points + pointCount;
const QPointF *last = end - 1;
- QVector<QPointF> *bin[2] = { upper, lower };
+ QList<QPointF> *bin[2] = { upper, lower };
for (const QPointF *p = points; p < end; ++p) {
int side = p->y() < splitY;
@@ -1952,7 +1952,7 @@ void QRasterPaintEngine::fillPolygon(const QPointF *points, int pointCount, Poly
// max amount of points that raster engine can reliably handle
if (pointCount > maxPoints) {
- QVector<QPointF> upper, lower;
+ QList<QPointF> upper, lower;
if (splitPolygon(points, pointCount, &upper, &lower)) {
fillPolygon(upper.constData(), upper.size(), mode);
@@ -3289,7 +3289,7 @@ void QRasterPaintEnginePrivate::rasterizeLine_dashed(QLineF line,
const QPen &pen = s->lastPen;
const bool squareCap = (pen.capStyle() == Qt::SquareCap);
- const QVector<qreal> pattern = pen.dashPattern();
+ const QList<qreal> pattern = pen.dashPattern();
qreal patternLength = 0;
for (int i = 0; i < pattern.size(); ++i)
@@ -3831,7 +3831,7 @@ QImage::Format QRasterBuffer::prepare(QImage *image)
format = image->format();
if (image->depth() == 1 && image->colorTable().size() == 2) {
monoDestinationWithClut = true;
- const QVector<QRgb> colorTable = image->colorTable();
+ const QList<QRgb> colorTable = image->colorTable();
destColor0 = qPremultiply(colorTable[0]);
destColor1 = qPremultiply(colorTable[1]);
}