[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
This commit is contained in:
parent
fb4dc9a9cf
commit
99804e0233
1 changed files with 5 additions and 0 deletions
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue