[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-commits
Subject:    [kwin] /: [wayland] AbstractBackend announces whether a surface less context is possible
From:       Martin_Gräßlin <mgraesslin () kde ! org>
Date:       2015-08-25 12:41:15
Message-ID: E1ZUDXP-0003D6-4O () scm ! kde ! org
[Download RAW message or body]

Git commit d8378306613c816ba7de60cf1706dd9f183542b5 by Martin Gräßlin.
Committed on 25/08/2015 at 12:33.
Pushed by graesslin into branch 'master'.

[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.

M  +5    -0    abstract_backend.cpp
M  +5    -0    abstract_backend.h

http://commits.kde.org/kwin/d8378306613c816ba7de60cf1706dd9f183542b5

diff --git a/abstract_backend.cpp b/abstract_backend.cpp
index bdded1f..a8b7881 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 bb93f78..a6586d9 100644
--- a/abstract_backend.h
+++ b/abstract_backend.h
@@ -47,6 +47,11 @@ public:
     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.
      **/
     virtual EGLDisplay sceneEglDisplay() const;

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic