From bec50eaec04258b9a5df6ac4179dee6459dd1ad3 Mon Sep 17 00:00:00 2001 From: Aleix Pol Date: Wed, 9 Jun 2021 11:52:03 +0200 Subject: [PATCH] deform effect: Use the provided matrix instead of creating a new one --- src/libkwineffects/kwindeformeffect.cpp | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/libkwineffects/kwindeformeffect.cpp b/src/libkwineffects/kwindeformeffect.cpp index dcd46408e9..cc5a19d0fe 100644 --- a/src/libkwineffects/kwindeformeffect.cpp +++ b/src/libkwineffects/kwindeformeffect.cpp @@ -148,9 +148,7 @@ void DeformEffectPrivate::paint(EffectWindow *window, GLTexture *texture, const const qreal rgb = data.brightness() * data.opacity(); const qreal a = data.opacity(); - const QRect screenRect = effects->virtualScreenGeometry(); - QMatrix4x4 mvp; - mvp.ortho(0, screenRect.width(), screenRect.height(), 0, 0, 65535); + QMatrix4x4 mvp = data.screenProjectionMatrix(); mvp.translate(window->x(), window->y()); shader->setUniform(GLShader::ModelViewProjectionMatrix, mvp); shader->setUniform(GLShader::ModulationConstant, QVector4D(rgb, rgb, rgb, a));