opengl/glplatform: remove GLPlatform::supports method
There's only one "feature" left, so the method for it can be used instead
This commit is contained in:
parent
c41da588f6
commit
5aa2606f04
4 changed files with 3 additions and 26 deletions
|
@ -141,7 +141,7 @@ void GLPlatformTest::testPriorDetect()
|
|||
{
|
||||
auto *gl = GLPlatform::instance();
|
||||
QVERIFY(gl);
|
||||
QCOMPARE(gl->supports(GLFeature::LooseBinding), false);
|
||||
QCOMPARE(gl->isLooseBinding(), false);
|
||||
|
||||
QCOMPARE(gl->glVersion(), Version());
|
||||
QCOMPARE(gl->glslVersion(), Version());
|
||||
|
@ -235,7 +235,7 @@ void GLPlatformTest::testDetect()
|
|||
|
||||
const KConfigGroup settingsGroup = config.group(QStringLiteral("Settings"));
|
||||
|
||||
QCOMPARE(gl->supports(GLFeature::LooseBinding), settingsGroup.readEntry("LooseBinding", false));
|
||||
QCOMPARE(gl->isLooseBinding(), settingsGroup.readEntry("LooseBinding", false));
|
||||
|
||||
QCOMPARE(gl->glVersion(), readVersion(settingsGroup, "GLVersion"));
|
||||
QCOMPARE(gl->glslVersion(), readVersion(settingsGroup, "GLSLVersion"));
|
||||
|
|
|
@ -230,7 +230,7 @@ bool X11Compositor::attemptOpenGLCompositing()
|
|||
|
||||
// set strict binding
|
||||
if (options->isGlStrictBindingFollowsDriver()) {
|
||||
options->setGlStrictBinding(!GLPlatform::instance()->supports(GLFeature::LooseBinding));
|
||||
options->setGlStrictBinding(!GLPlatform::instance()->isLooseBinding());
|
||||
}
|
||||
|
||||
qCDebug(KWIN_CORE) << "OpenGL compositing has been successfully initialized";
|
||||
|
|
|
@ -1054,15 +1054,6 @@ void GLPlatform::printResults() const
|
|||
print(QByteArrayLiteral("Timer query support:"), m_context->supportsTimerQueries() ? QByteArrayLiteral("yes") : QByteArrayLiteral("no"));
|
||||
}
|
||||
|
||||
bool GLPlatform::supports(GLFeature feature) const
|
||||
{
|
||||
switch (feature) {
|
||||
case GLFeature::LooseBinding:
|
||||
return m_looseBinding;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
Version GLPlatform::glVersion() const
|
||||
{
|
||||
return m_context ? m_context->openglVersion() : Version();
|
||||
|
|
|
@ -23,15 +23,6 @@ void cleanupGL();
|
|||
|
||||
class Version;
|
||||
|
||||
enum class GLFeature {
|
||||
/**
|
||||
* Set when a texture bound to a pixmap uses the same storage as the pixmap,
|
||||
* and thus doesn't need to be rebound when the contents of the pixmap
|
||||
* has changed.
|
||||
*/
|
||||
LooseBinding,
|
||||
};
|
||||
|
||||
enum Driver {
|
||||
Driver_R100, // Technically "Radeon"
|
||||
Driver_R200,
|
||||
|
@ -164,11 +155,6 @@ public:
|
|||
*/
|
||||
static GLPlatform *instance();
|
||||
|
||||
/**
|
||||
* Returns true if the driver support the given feature, and false otherwise.
|
||||
*/
|
||||
bool supports(GLFeature feature) const;
|
||||
|
||||
/**
|
||||
* Returns the OpenGL version.
|
||||
*/
|
||||
|
|
Loading…
Reference in a new issue