diff --git a/abstract_backend.cpp b/abstract_backend.cpp index bdded1f75b..a8b7881c4a 100644 --- a/abstract_backend.cpp +++ b/abstract_backend.cpp @@ -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()) { diff --git a/abstract_backend.h b/abstract_backend.h index bb93f783d8..a6586d93ed 100644 --- a/abstract_backend.h +++ b/abstract_backend.h @@ -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. **/