From e459c8bf543176f4a99ab748d7dfb7e8ba59afa7 Mon Sep 17 00:00:00 2001 From: Aleix Pol Date: Tue, 23 Jun 2020 14:58:48 +0200 Subject: [PATCH] No need to recalculate the matrix if yInverted doesn't change --- libkwineffects/kwingltexture.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/libkwineffects/kwingltexture.cpp b/libkwineffects/kwingltexture.cpp index 398a1f2491..467fbbfb3d 100644 --- a/libkwineffects/kwingltexture.cpp +++ b/libkwineffects/kwingltexture.cpp @@ -628,6 +628,9 @@ bool GLTexture::isYInverted() const void GLTexture::setYInverted(bool inverted) { Q_D(GLTexture); + if (d->m_yInverted == inverted) + return; + d->m_yInverted = inverted; d->updateMatrix(); }