Make Compositor responsible for syncing the GlStrictBinding flag
The GlStrictBinding flag indicates whether it's okay not to re-bind the X11 pixmap to the OpenGL surface texture if the corresponding window is damaged. It doesn't really affect the SceneOpenGL, only low level backend stuff.
This commit is contained in:
parent
dabcb558b4
commit
3ade20eea5
2 changed files with 6 additions and 5 deletions
|
@ -34,6 +34,7 @@
|
|||
#include "x11syncmanager.h"
|
||||
#include "xcbutils.h"
|
||||
|
||||
#include <kwinglplatform.h>
|
||||
#include <kwingltexture.h>
|
||||
|
||||
#include <KWaylandServer/surface_interface.h>
|
||||
|
@ -192,6 +193,11 @@ bool Compositor::attemptOpenGLCompositing()
|
|||
m_backend = backend.take();
|
||||
m_scene = scene.take();
|
||||
|
||||
// set strict binding
|
||||
if (options->isGlStrictBindingFollowsDriver()) {
|
||||
options->setGlStrictBinding(!GLPlatform::instance()->supports(LooseBinding));
|
||||
}
|
||||
|
||||
qCDebug(KWIN_CORE) << "OpenGL compositing has been successfully initialized";
|
||||
return true;
|
||||
}
|
||||
|
|
|
@ -96,11 +96,6 @@ SceneOpenGL::SceneOpenGL(OpenGLBackend *backend, QObject *parent)
|
|||
glBindVertexArray(vao);
|
||||
}
|
||||
|
||||
// set strict binding
|
||||
if (options->isGlStrictBindingFollowsDriver()) {
|
||||
options->setGlStrictBinding(!glPlatform->supports(LooseBinding));
|
||||
}
|
||||
|
||||
qCDebug(KWIN_OPENGL) << "OpenGL 2 compositing successfully initialized";
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue