From 181afc85fe75986eb77ae1e033cfdb4e0123137e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fredrik=20H=C3=B6glund?= Date: Sat, 22 Nov 2014 15:14:07 +0100 Subject: [PATCH] Remove the saturation support checks We no longer use texture environment parameters to control saturation. --- libkwineffects/kwingltexture.cpp | 11 ----------- libkwineffects/kwingltexture.h | 1 - libkwineffects/kwingltexture_p.h | 1 - 3 files changed, 13 deletions(-) diff --git a/libkwineffects/kwingltexture.cpp b/libkwineffects/kwingltexture.cpp index 1393eb7c2c..e98efa24cf 100644 --- a/libkwineffects/kwingltexture.cpp +++ b/libkwineffects/kwingltexture.cpp @@ -44,7 +44,6 @@ namespace KWin bool GLTexturePrivate::sNPOTTextureSupported = false; bool GLTexturePrivate::sFramebufferObjectSupported = false; -bool GLTexturePrivate::sSaturationSupported = false; GLenum GLTexturePrivate::sTextureFormat = GL_RGBA; // custom dummy, GL_BGRA is not present on GLES uint GLTexturePrivate::s_textureObjectCounter = 0; uint GLTexturePrivate::s_fbo = 0; @@ -162,14 +161,10 @@ void GLTexturePrivate::initStatic() if (!GLPlatform::instance()->isGLES()) { sNPOTTextureSupported = hasGLExtension(QByteArrayLiteral("GL_ARB_texture_non_power_of_two")); sFramebufferObjectSupported = hasGLExtension(QByteArrayLiteral("GL_EXT_framebuffer_object")); - sSaturationSupported = ((hasGLExtension(QByteArrayLiteral("GL_ARB_texture_env_crossbar")) - && hasGLExtension(QByteArrayLiteral("GL_ARB_texture_env_dot3"))) || hasGLVersion(1, 4)) - && (glTextureUnitsCount >= 4) && glActiveTexture != nullptr; sTextureFormat = GL_BGRA; } else { sNPOTTextureSupported = true; sFramebufferObjectSupported = true; - sSaturationSupported = true; if (hasGLExtension(QByteArrayLiteral("GL_EXT_texture_format_BGRA8888"))) sTextureFormat = GL_BGRA_EXT; else @@ -181,7 +176,6 @@ void GLTexturePrivate::cleanup() { sNPOTTextureSupported = false; sFramebufferObjectSupported = false; - sSaturationSupported = false; sTextureFormat = GL_RGBA; // custom dummy, GL_BGRA is not present on GLES } @@ -611,9 +605,4 @@ bool GLTexture::framebufferObjectSupported() return GLTexturePrivate::sFramebufferObjectSupported; } -bool GLTexture::saturationSupported() -{ - return GLTexturePrivate::sSaturationSupported; -} - } // namespace KWin diff --git a/libkwineffects/kwingltexture.h b/libkwineffects/kwingltexture.h index 7df249a9cd..53c6d19e1e 100644 --- a/libkwineffects/kwingltexture.h +++ b/libkwineffects/kwingltexture.h @@ -106,7 +106,6 @@ public: static bool NPOTTextureSupported(); static bool framebufferObjectSupported(); - static bool saturationSupported(); protected: QExplicitlySharedDataPointer d_ptr; diff --git a/libkwineffects/kwingltexture_p.h b/libkwineffects/kwingltexture_p.h index cea43e38be..5c173cb812 100644 --- a/libkwineffects/kwingltexture_p.h +++ b/libkwineffects/kwingltexture_p.h @@ -72,7 +72,6 @@ public: static bool sNPOTTextureSupported; static bool sFramebufferObjectSupported; - static bool sSaturationSupported; static GLenum sTextureFormat; static uint s_fbo; static uint s_textureObjectCounter;