diff options
author | Jorgen Lind <jorgen.lind@digia.com> | 2014-05-16 13:56:23 +0200 |
---|---|---|
committer | The Qt Project <gerrit-noreply@qt-project.org> | 2014-05-16 14:39:00 +0200 |
commit | 102cec7ec03822243d9cb99763a0c02f9a13351d (patch) | |
tree | 9c24c981856b3b195102cfee12b231c2ab9ae96f /src | |
parent | 1248eddd1461d3fa6e87d1d3278016d102f47e18 (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.cpp | 4 |
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"); |