From b1e258d1e933bdd96d4e42b070379737793e69df Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20Gr=C3=A4=C3=9Flin?= Date: Tue, 22 Nov 2016 07:44:37 +0100 Subject: [PATCH] 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 --- libkwineffects/kwinglplatform.cpp | 16 ++++------------ 1 file changed, 4 insertions(+), 12 deletions(-) diff --git a/libkwineffects/kwinglplatform.cpp b/libkwineffects/kwinglplatform.cpp index 49758dd732..2b7b9a4c47 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");