diff options
Diffstat (limited to 'src/hardwareintegration/compositor/xcomposite-glx/xcompositeglxintegration.h')
-rw-r--r-- | src/hardwareintegration/compositor/xcomposite-glx/xcompositeglxintegration.h | 29 |
1 files changed, 23 insertions, 6 deletions
diff --git a/src/hardwareintegration/compositor/xcomposite-glx/xcompositeglxintegration.h b/src/hardwareintegration/compositor/xcomposite-glx/xcompositeglxintegration.h index 9caeb464..7b63f976 100644 --- a/src/hardwareintegration/compositor/xcomposite-glx/xcompositeglxintegration.h +++ b/src/hardwareintegration/compositor/xcomposite-glx/xcompositeglxintegration.h @@ -38,7 +38,7 @@ #define XCOMPOSITEGLXINTEGRATION_H #include <QtWaylandCompositor/private/qwlclientbufferintegration_p.h> - +#include <QtWaylandCompositor/private/qwlclientbuffer_p.h> #include "xlibinclude.h" #define GLX_GLXEXT_PROTOTYPES @@ -56,21 +56,38 @@ public: ~XCompositeGLXClientBufferIntegration(); void initializeHardware(struct ::wl_display *display) Q_DECL_OVERRIDE; + QtWayland::ClientBuffer *createBufferFor(wl_resource *buffer) Q_DECL_OVERRIDE; - void bindTextureToBuffer(struct ::wl_resource *buffer) Q_DECL_OVERRIDE; - QWaylandSurface::Origin origin(struct ::wl_resource *) const Q_DECL_OVERRIDE; - - QSize bufferSize(struct ::wl_resource *buffer) const Q_DECL_OVERRIDE; + inline Display *xDisplay() const { return mDisplay; } + inline int xScreen() const { return mScreen; } -private: PFNGLXBINDTEXIMAGEEXTPROC m_glxBindTexImageEXT; PFNGLXRELEASETEXIMAGEEXTPROC m_glxReleaseTexImageEXT; +private: Display *mDisplay; int mScreen; XCompositeHandler *mHandler; }; +class XCompositeGLXClientBuffer : public QtWayland::ClientBuffer +{ +public: + XCompositeGLXClientBuffer(XCompositeGLXClientBufferIntegration *integration, wl_resource *bufferResource); + + QSize size() const; + QWaylandSurface::Origin origin() const; + QOpenGLTexture *toOpenGlTexture(int plane) Q_DECL_OVERRIDE; + QWaylandBufferRef::BufferFormatEgl bufferFormatEgl() const Q_DECL_OVERRIDE { + return QWaylandBufferRef::BufferFormatEgl_RGBA; + } + +private: + QOpenGLTexture *m_texture; + XCompositeGLXClientBufferIntegration *m_integration; + GLXPixmap m_glxPixmap; +}; + QT_END_NAMESPACE #endif // XCOMPOSITEGLXINTEGRATION_H |