pipewire: No need to create a QRect when we just need its size
This commit is contained in:
parent
c1fb405b8d
commit
67ec16c335
1 changed files with 3 additions and 4 deletions
|
@ -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;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue