From 2cec03dede6bc90e071dca8cacb2e833aba22690 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fredrik=20H=C3=B6glund?= Date: Thu, 21 Mar 2013 16:31:06 +0100 Subject: [PATCH] kwin: Fix the blend function in the lanczos filter The alpha values are pre-multiplied. --- lanczosfilter.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lanczosfilter.cpp b/lanczosfilter.cpp index ef79837f6c..b0f85e2e8f 100644 --- a/lanczosfilter.cpp +++ b/lanczosfilter.cpp @@ -208,7 +208,7 @@ void LanczosFilter::performPaint(EffectWindowImpl* w, int mask, QRegion region, } if (effects->compositingType() == OpenGL2Compositing) { glEnable(GL_BLEND); - glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA); + glBlendFunc(GL_ONE, GL_ONE_MINUS_SRC_ALPHA); const qreal rgb = data.brightness() * data.opacity(); const qreal a = data.opacity(); @@ -344,7 +344,7 @@ void LanczosFilter::performPaint(EffectWindowImpl* w, int mask, QRegion region, } if (effects->compositingType() == OpenGL2Compositing) { glEnable(GL_BLEND); - glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA); + glBlendFunc(GL_ONE, GL_ONE_MINUS_SRC_ALPHA); const qreal rgb = data.brightness() * data.opacity(); const qreal a = data.opacity();