[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
This commit is contained in:
Vlad Zagorodniy 2019-02-07 01:02:32 +02:00
parent 54e46dbd9f
commit bdddf4daf2

View file

@ -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);