diff options
Diffstat (limited to 'src/plugins/platforms/eglfs/qeglfshooks_kms.cpp')
-rw-r--r-- | src/plugins/platforms/eglfs/qeglfshooks_kms.cpp | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/src/plugins/platforms/eglfs/qeglfshooks_kms.cpp b/src/plugins/platforms/eglfs/qeglfshooks_kms.cpp index e9eec7fdc7..61a1ee7a87 100644 --- a/src/plugins/platforms/eglfs/qeglfshooks_kms.cpp +++ b/src/plugins/platforms/eglfs/qeglfshooks_kms.cpp @@ -108,10 +108,12 @@ public: EGLNativeWindowType createNativeWindow(QPlatformWindow *platformWindow, const QSize &size, const QSurfaceFormat &format) Q_DECL_OVERRIDE; + EGLNativeWindowType createNativeOffscreenWindow(const QSurfaceFormat &format) Q_DECL_OVERRIDE; void destroyNativeWindow(EGLNativeWindowType window) Q_DECL_OVERRIDE; bool hasCapability(QPlatformIntegration::Capability cap) const Q_DECL_OVERRIDE; QPlatformCursor *createCursor(QPlatformScreen *screen) const Q_DECL_OVERRIDE; void presentBuffer() Q_DECL_OVERRIDE; + bool supportsPBuffers() const Q_DECL_OVERRIDE; private: bool setup_kms(); @@ -259,6 +261,18 @@ EGLNativeWindowType QEglKmsHooks::createNativeWindow(QPlatformWindow *platformWi return reinterpret_cast<EGLNativeWindowType>(m_gbm_surface); } +EGLNativeWindowType QEglKmsHooks::createNativeOffscreenWindow(const QSurfaceFormat &format) +{ + Q_UNUSED(format); + + gbm_surface *surface = gbm_surface_create(m_gbm_device, + 1, 1, + GBM_FORMAT_XRGB8888, + GBM_BO_USE_RENDERING); + + return reinterpret_cast<EGLNativeWindowType>(surface); +} + void QEglKmsHooks::destroyNativeWindow(EGLNativeWindowType window) { gbm_surface *surface = reinterpret_cast<gbm_surface *>(window); @@ -413,6 +427,11 @@ void QEglKmsHooks::presentBuffer() } } +bool QEglKmsHooks::supportsPBuffers() const +{ + return false; +} + bool QEglKmsHooks::setup_kms() { drmModeRes *resources; |