pipewire: No need to create a QRect when we just need its size

This commit is contained in:
Aleix Pol 2021-10-11 15:54:19 +02:00
parent c1fb405b8d
commit 67ec16c335

View file

@ -316,14 +316,13 @@ void PipeWireStream::stop()
static GLTexture *copyTexture(GLTexture *texture)
{
GLTexture *copy = new GLTexture(texture->internalFormat(), texture->size());
const QSize size = texture->size();
GLTexture *copy = new GLTexture(texture->internalFormat(), size);
copy->setFilter(GL_LINEAR);
copy->setWrapMode(GL_CLAMP_TO_EDGE);
const QRect r({}, texture->size());
copy->bind();
glCopyTextureSubImage2D(copy->texture(), 0, 0, 0, 0, 0, r.width(), r.height());
glCopyTextureSubImage2D(copy->texture(), 0, 0, 0, 0, 0, size.width(), size.height());
copy->unbind();
return copy;
}