[wayland] AbstractBackend announces whether a surface less context is possible

In an own QPA plugin we want to make the OpenGL context sharing with
our compositing context and bypass the windowing system for OpenGL
windows. In order to achieve this we need a surfaceless context.

The AbstractBackend now forwards whether such a context can be created on
the EGLDisplay used by the Compositor.
This commit is contained in:
Martin Gräßlin 2015-08-18 08:40:35 +02:00
parent b9d7726f7a
commit d837830661
2 changed files with 10 additions and 0 deletions

View file

@ -305,6 +305,11 @@ void AbstractBackend::warpPointer(const QPointF &globalPos)
Q_UNUSED(globalPos)
}
bool AbstractBackend::supportsQpaContext() const
{
return hasGLExtension(QByteArrayLiteral("EGL_KHR_surfaceless_context"));
}
EGLDisplay AbstractBackend::sceneEglDisplay() const
{
if (Compositor *c = Compositor::self()) {

View file

@ -46,6 +46,11 @@ public:
virtual OpenGLBackend *createOpenGLBackend();
virtual QPainterBackend *createQPainterBackend();
virtual void warpPointer(const QPointF &globalPos);
/**
* Whether our Compositing EGL display allows a surface less context
* so that a sharing context could be created.
**/
virtual bool supportsQpaContext() const;
/**
* The EGLDisplay used by the compositing scene.
**/