summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLaszlo Agocs <[email protected]>2020-06-30 09:01:11 +0200
committerLaszlo Agocs <[email protected]>2020-06-30 13:01:35 +0200
commit18eb51b8139f214a92d532d435366f0c0d2d15e6 (patch)
tree0a4d7e9d0e76d75489d3e8ee5a7e32b70f3ad181
parentf1ccccb7dd9e72c53c24d5794378877f6cf3181a (diff)
Switch to qvla where makes sense in opengl
For all of these we know in advance that the vast majority of usages will not exceed a certain number of elements. Also, none of these are copied or moved ever. Change-Id: I265afec154939c2fd0d1f902d97a86315ec7bc20 Reviewed-by: Andy Nichols <[email protected]>
-rw-r--r--src/opengl/qopenglframebufferobject_p.h2
-rw-r--r--src/opengl/qopenglpaintengine_p.h4
-rw-r--r--src/opengl/qplatformbackingstoreopenglsupport.cpp2
3 files changed, 4 insertions, 4 deletions
diff --git a/src/opengl/qopenglframebufferobject_p.h b/src/opengl/qopenglframebufferobject_p.h
index 2eb5936cb43..62c541fdc3e 100644
--- a/src/opengl/qopenglframebufferobject_p.h
+++ b/src/opengl/qopenglframebufferobject_p.h
@@ -141,7 +141,7 @@ public:
GLenum internalFormat;
QOpenGLSharedResourceGuard *guard;
};
- QList<ColorAttachment> colorAttachments;
+ QVarLengthArray<ColorAttachment, 8> colorAttachments;
inline GLuint fbo() const { return fbo_guard ? fbo_guard->id() : 0; }
};
diff --git a/src/opengl/qopenglpaintengine_p.h b/src/opengl/qopenglpaintengine_p.h
index 1a5f82b3130..f2e5d97f398 100644
--- a/src/opengl/qopenglpaintengine_p.h
+++ b/src/opengl/qopenglpaintengine_p.h
@@ -332,8 +332,8 @@ public:
QTriangulatingStroker stroker;
QDashedStrokeProcessor dasher;
- QList<GLuint> unusedVBOSToClean;
- QList<GLuint> unusedIBOSToClean;
+ QVarLengthArray<GLuint, 8> unusedVBOSToClean;
+ QVarLengthArray<GLuint, 8> unusedIBOSToClean;
const GLfloat *vertexAttribPointers[3];
};
diff --git a/src/opengl/qplatformbackingstoreopenglsupport.cpp b/src/opengl/qplatformbackingstoreopenglsupport.cpp
index 5a9b41dd29a..6f893671c09 100644
--- a/src/opengl/qplatformbackingstoreopenglsupport.cpp
+++ b/src/opengl/qplatformbackingstoreopenglsupport.cpp
@@ -94,7 +94,7 @@ static QRegion deviceRegion(const QRegion &region, QWindow *window, const QPoint
if (offset.isNull() && window->devicePixelRatio() <= 1)
return region;
- QList<QRect> rects;
+ QVarLengthArray<QRect, 4> rects;
rects.reserve(region.rectCount());
for (const QRect &rect : region)
rects.append(deviceRect(rect.translated(offset), window));