aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMartin Gräßlin <[email protected]>2016-11-22 07:44:37 +0100
committerMartin Gräßlin <[email protected]>2016-11-22 07:46:22 +0100
commitb1e258d1e933bdd96d4e42b070379737793e69df (patch)
treeb2984e4df36e553e8d1077ee3306340c7bf0e011
parent451bbb54ddf864f80142f36a9d5d54f57e434f1c (diff)
Remove useless branching on EGL/GLX in GLPlatform
Summary: The code for EGL and GLX platform did the same checks, just with the difference that the EGL check has another check for isGLES. So let's just do the branching on whether isGLES or GL. Reviewers: #kwin, #plasma Subscribers: plasma-devel, kwin Tags: #kwin Differential Revision: https://phabricator.kde.org/D3446
-rw-r--r--libkwineffects/kwinglplatform.cpp16
1 files changed, 4 insertions, 12 deletions
diff --git a/libkwineffects/kwinglplatform.cpp b/libkwineffects/kwinglplatform.cpp
index 49758dd..2b7b9a4 100644
--- a/libkwineffects/kwinglplatform.cpp
+++ b/libkwineffects/kwinglplatform.cpp
@@ -631,18 +631,10 @@ void GLPlatform::detect(OpenGLPlatformInterface platformInterface)
m_mesaVersion = parseVersionString(version);
}
- if (platformInterface == EglPlatformInterface) {
- if (isGLES()) {
- m_supportsGLSL = true;
- m_textureNPOT = true;
- } else {
- m_supportsGLSL = m_extensions.contains("GL_ARB_shader_objects") &&
- m_extensions.contains("GL_ARB_fragment_shader") &&
- m_extensions.contains("GL_ARB_vertex_shader");
-
- m_textureNPOT = m_extensions.contains("GL_ARB_texture_non_power_of_two");
- }
- } else if (platformInterface == GlxPlatformInterface) {
+ if (isGLES()) {
+ m_supportsGLSL = true;
+ m_textureNPOT = true;
+ } else {
m_supportsGLSL = m_extensions.contains("GL_ARB_shader_objects") &&
m_extensions.contains("GL_ARB_fragment_shader") &&
m_extensions.contains("GL_ARB_vertex_shader");