From 102cec7ec03822243d9cb99763a0c02f9a13351d Mon Sep 17 00:00:00 2001 From: Jorgen Lind Date: Fri, 16 May 2014 13:56:23 +0200 Subject: QOpenGLTextureBlitter fix allocating 4 times as much memory as needed and copying a lot of garbage. Change-Id: Idf1d23d06423a98ce503c9bcf9614b12dd1fb92a Reviewed-by: Laszlo Agocs --- src/gui/opengl/qopengltextureblitter.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src') 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"); -- cgit v1.2.3