summaryrefslogtreecommitdiffstats
path: root/src/gui/rhi/qrhigles2_p_p.h
diff options
context:
space:
mode:
authorRobert Löhning <robert.loehning@qt.io>2021-05-12 22:58:07 +0200
committerRobert Löhning <robert.loehning@qt.io>2021-06-08 21:27:41 +0200
commit9b625ec89dd796f7eff16aedef6aa23b6319a58d (patch)
tree71f7d010e221f8e65beed9f0aa60e3ef0295de17 /src/gui/rhi/qrhigles2_p_p.h
parent7661fdce0a1a502b1d2f6a89b0d89234b12aabb9 (diff)
rhi: Use QByteArray for storing data in QGles2Buffer
Mainly to avoid leaking memory again. A possible reduction of memory allocations would be a welcome side effect. This reverts parts of 89f7389494c6fc917f189150e06ed1fcfaa238e8. Change-Id: I65a7529f532175967a4e408450aa55549b77d7e4 Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
Diffstat (limited to 'src/gui/rhi/qrhigles2_p_p.h')
-rw-r--r--src/gui/rhi/qrhigles2_p_p.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/gui/rhi/qrhigles2_p_p.h b/src/gui/rhi/qrhigles2_p_p.h
index d5087b92ed..8a0e0ec2a1 100644
--- a/src/gui/rhi/qrhigles2_p_p.h
+++ b/src/gui/rhi/qrhigles2_p_p.h
@@ -55,6 +55,7 @@
#include "qrhi_p_p.h"
#include "qshaderdescription_p.h"
#include <qopengl.h>
+#include <QByteArray>
#include <QSurface>
QT_BEGIN_NAMESPACE
@@ -74,7 +75,7 @@ struct QGles2Buffer : public QRhiBuffer
int nonZeroSize = 0;
GLuint buffer = 0;
GLenum targetForDataOps;
- char *data = nullptr;
+ QByteArray data;
enum Access {
AccessNone,
AccessVertex,