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 <andy.nichols@qt.io>bb10
parent
f1ccccb7dd
commit
18eb51b813
|
|
@ -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; }
|
||||
};
|
||||
|
|
|
|||
|
|
@ -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];
|
||||
};
|
||||
|
|
|
|||
|
|
@ -94,7 +94,7 @@ static QRegion deviceRegion(const QRegion ®ion, 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));
|
||||
|
|
|
|||
Loading…
Reference in New Issue