scenes/opengl: Use GL_LINEAR also on X11

We've been using GL_LINEAR on Wayland for a couple of years, and it has
caused us no issues. For the consistency sake, let's do the same on X11.
This commit is contained in:
Vlad Zahorodnii 2021-07-06 14:55:10 +03:00
parent 8da06a0bdb
commit 95adc883aa

View file

@ -1040,20 +1040,6 @@ void OpenGLWindow::performPaint(int mask, const QRegion &region, const WindowPai
}
GLShader *shader = data.shader;
GLenum filter;
if (waylandServer()) {
filter = GL_LINEAR;
} else {
const bool isTransformed = mask & (Effect::PAINT_WINDOW_TRANSFORMED |
Effect::PAINT_SCREEN_TRANSFORMED);
if (isTransformed && options->glSmoothScale() != 0) {
filter = GL_LINEAR;
} else {
filter = GL_NEAREST;
}
}
if (!shader) {
ShaderTraits traits = ShaderTrait::MapTexture;
@ -1125,7 +1111,7 @@ void OpenGLWindow::performPaint(int mask, const QRegion &region, const WindowPai
opacity = renderNode.opacity;
}
renderNode.texture->setFilter(filter);
renderNode.texture->setFilter(GL_LINEAR);
renderNode.texture->setWrapMode(GL_CLAMP_TO_EDGE);
renderNode.texture->bind();