diff --git a/compositingprefs.cpp b/compositingprefs.cpp index 187435eea7..1650133ca1 100644 --- a/compositingprefs.cpp +++ b/compositingprefs.cpp @@ -157,9 +157,6 @@ void CompositingPrefs::detect() if (!haveContext) { canDetect = initEGLContext(); } - if (canDetect) { - detectDriverAndVersion(); - } if (!haveContext) { deleteEGLContext(); } @@ -202,9 +199,7 @@ void CompositingPrefs::detect() if (hasglx13) oldreaddrawable = glXGetCurrentReadDrawable(); - if (initGLXContext()) { - detectDriverAndVersion(); - } + initGLXContext(); if (hasglx13) glXMakeContextCurrent(display(), olddrawable, oldreaddrawable, oldcontext); else @@ -365,12 +360,5 @@ void CompositingPrefs::deleteEGLContext() #endif } -void CompositingPrefs::detectDriverAndVersion() -{ - GLPlatform *gl = GLPlatform::instance(); - gl->detect(); - gl->printResults(); -} - } // namespace diff --git a/compositingprefs.h b/compositingprefs.h index a0dbc2458d..ec4e47a2c3 100644 --- a/compositingprefs.h +++ b/compositingprefs.h @@ -58,8 +58,6 @@ public: protected: - void detectDriverAndVersion(); - bool initGLXContext(); void deleteGLXContext(); bool initEGLContext(); diff --git a/scene_opengl_egl.cpp b/scene_opengl_egl.cpp index d0ce3608c4..87690bff8d 100644 --- a/scene_opengl_egl.cpp +++ b/scene_opengl_egl.cpp @@ -42,6 +42,9 @@ SceneOpenGL::SceneOpenGL(Workspace* ws) kError(1212) << "Required support for binding pixmaps to EGLImages not found, disabling compositing"; return; } + GLPlatform *glPlatform = GLPlatform::instance(); + glPlatform->detect(); + glPlatform->printResults(); initGL(); if (!hasGLExtension("GL_OES_EGL_image")) { kError(1212) << "Required extension GL_OES_EGL_image not found, disabling compositing"; diff --git a/scene_opengl_glx.cpp b/scene_opengl_glx.cpp index e75275aaa1..1ec57631d3 100644 --- a/scene_opengl_glx.cpp +++ b/scene_opengl_glx.cpp @@ -55,9 +55,11 @@ SceneOpenGL::SceneOpenGL(Workspace* ws) if (!initRenderingContext()) return; // error // Initialize OpenGL + GLPlatform *glPlatform = GLPlatform::instance(); + glPlatform->detect(); + glPlatform->printResults(); initGL(); - GLPlatform *glPlatform = GLPlatform::instance(); if (glPlatform->isSoftwareEmulation()) { kError(1212) << "OpenGL Software Rasterizer detected. Falling back to XRender."; QTimer::singleShot(0, Workspace::self(), SLOT(fallbackToXRenderCompositing()));