Commit 99804e02 authored by Vlad Zahorodnii's avatar Vlad Zahorodnii

[effects/mousemark] Properly use GL_LINE_SMOOTH

Summary:
We need to enable GL_BLEND for line smoothing to work.

CCBUG: 337044

Test Plan:
Before:
{F6184072, layout=center, size=full}

After:
{F6184074, layout=center, size=full}

Reviewers: #kwin, davidedmundson

Reviewed By: #kwin, davidedmundson

Subscribers: davidedmundson, kwin

Tags: #kwin

Differential Revision: https://phabricator.kde.org/D14714
parent fb4dc9a9
......@@ -119,7 +119,11 @@ void MouseMarkEffect::paintScreen(int mask, QRegion region, ScreenPaintData& dat
return;
if ( effects->isOpenGLCompositing()) {
if (!GLPlatform::instance()->isGLES()) {
glEnable(GL_BLEND);
glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);
glEnable(GL_LINE_SMOOTH);
glHint(GL_LINE_SMOOTH_HINT, GL_NICEST);
}
glLineWidth(width);
GLVertexBuffer *vbo = GLVertexBuffer::streamingBuffer();
......@@ -150,6 +154,7 @@ void MouseMarkEffect::paintScreen(int mask, QRegion region, ScreenPaintData& dat
glLineWidth(1.0);
if (!GLPlatform::instance()->isGLES()) {
glDisable(GL_LINE_SMOOTH);
glDisable(GL_BLEND);
}
}
#ifdef KWIN_HAVE_XRENDER_COMPOSITING
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment