Move detection of GLPlatform and printResults into Scene
This means the GLPlatform is filled with values from the context actually used for Compositing and if XRender compositing is used no OpenGL information is logged.
This commit is contained in:
parent
23708521c6
commit
2fc0b8074b
4 changed files with 7 additions and 16 deletions
|
@ -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
|
||||
|
||||
|
|
|
@ -58,8 +58,6 @@ public:
|
|||
|
||||
protected:
|
||||
|
||||
void detectDriverAndVersion();
|
||||
|
||||
bool initGLXContext();
|
||||
void deleteGLXContext();
|
||||
bool initEGLContext();
|
||||
|
|
|
@ -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";
|
||||
|
|
|
@ -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()));
|
||||
|
|
Loading…
Reference in a new issue