From bdddf4daf2d810630e1527798384188e001c80ce Mon Sep 17 00:00:00 2001 From: Vlad Zagorodniy Date: Thu, 7 Feb 2019 01:02:32 +0200 Subject: [PATCH] [effects/screenedge] Use correct blend function Summary: Glow textures already have the red, green, and blue channels premultiplied by the alpha component (because of QImage), thus we can't use GL_SRC_ALPHA for sfactor in glBlendFunc. BUG: 403570 Test Plan: Before: {F6592391} After: {F6592392} Reviewers: #kwin, davidedmundson Reviewed By: #kwin, davidedmundson Subscribers: kwin Tags: #kwin Differential Revision: https://phabricator.kde.org/D18803 --- effects/screenedge/screenedgeeffect.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/effects/screenedge/screenedgeeffect.cpp b/effects/screenedge/screenedgeeffect.cpp index 1b8dea068c..ea72a7e959 100644 --- a/effects/screenedge/screenedgeeffect.cpp +++ b/effects/screenedge/screenedgeeffect.cpp @@ -102,7 +102,7 @@ void ScreenEdgeEffect::paintScreen(int mask, QRegion region, ScreenPaintData &da if (effects->isOpenGLCompositing()) { GLTexture *texture = (*it)->texture.data(); glEnable(GL_BLEND); - glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA); + glBlendFunc(GL_ONE, GL_ONE_MINUS_SRC_ALPHA); texture->bind(); ShaderBinder binder(ShaderTrait::MapTexture | ShaderTrait::Modulate); const QVector4D constant(opacity, opacity, opacity, opacity);