summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorJorgen Lind <jorgen.lind@digia.com>2014-05-16 13:56:23 +0200
committerThe Qt Project <gerrit-noreply@qt-project.org>2014-05-16 14:39:00 +0200
commit102cec7ec03822243d9cb99763a0c02f9a13351d (patch)
tree9c24c981856b3b195102cfee12b231c2ab9ae96f /src
parent1248eddd1461d3fa6e87d1d3278016d102f47e18 (diff)
QOpenGLTextureBlitter fix allocating 4 times as much memory as needed
and copying a lot of garbage. Change-Id: Idf1d23d06423a98ce503c9bcf9614b12dd1fb92a Reviewed-by: Laszlo Agocs <laszlo.agocs@digia.com>
Diffstat (limited to 'src')
-rw-r--r--src/gui/opengl/qopengltextureblitter.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/gui/opengl/qopengltextureblitter.cpp b/src/gui/opengl/qopengltextureblitter.cpp
index efe769badf..e6dbb70618 100644
--- a/src/gui/opengl/qopengltextureblitter.cpp
+++ b/src/gui/opengl/qopengltextureblitter.cpp
@@ -261,12 +261,12 @@ bool QOpenGLTextureBlitter::create()
d->vertexBuffer.create();
d->vertexBuffer.bind();
- d->vertexBuffer.allocate(vertex_buffer_data, sizeof(vertex_buffer_data) * sizeof(vertex_buffer_data[0]));
+ d->vertexBuffer.allocate(vertex_buffer_data, sizeof(vertex_buffer_data));
d->vertexBuffer.release();
d->textureBuffer.create();
d->textureBuffer.bind();
- d->textureBuffer.allocate(texture_buffer_data, sizeof(texture_buffer_data) * sizeof(texture_buffer_data[0]));
+ d->textureBuffer.allocate(texture_buffer_data, sizeof(texture_buffer_data));
d->textureBuffer.release();
d->vertexCoordAttribPos = d->program->attributeLocation("vertexCoord");