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>
bb10
Jorgen Lind 2014-05-16 13:56:23 +02:00 committed by The Qt Project
parent 1248eddd14
commit 102cec7ec0
1 changed files with 2 additions and 2 deletions

View File

@ -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");