diff options
Diffstat (limited to 'src/hardwareintegration/compositor/wayland-egl/waylandeglclientbufferintegration.h')
-rw-r--r-- | src/hardwareintegration/compositor/wayland-egl/waylandeglclientbufferintegration.h | 35 |
1 files changed, 24 insertions, 11 deletions
diff --git a/src/hardwareintegration/compositor/wayland-egl/waylandeglclientbufferintegration.h b/src/hardwareintegration/compositor/wayland-egl/waylandeglclientbufferintegration.h index 74cad708d..5385ac25f 100644 --- a/src/hardwareintegration/compositor/wayland-egl/waylandeglclientbufferintegration.h +++ b/src/hardwareintegration/compositor/wayland-egl/waylandeglclientbufferintegration.h @@ -39,6 +39,7 @@ #include <QtWaylandCompositor/private/qwlclientbufferintegration_p.h> #include <QtCore/QScopedPointer> +#include <QtWaylandCompositor/private/qwlclientbuffer_p.h> QT_BEGIN_NAMESPACE @@ -52,22 +53,34 @@ public: void initializeHardware(struct ::wl_display *display) Q_DECL_OVERRIDE; - void initializeBuffer(struct ::wl_resource *buffer) Q_DECL_OVERRIDE; - QWaylandBufferRef::BufferFormatEgl bufferFormat(struct ::wl_resource *buffer) Q_DECL_OVERRIDE; - uint textureForBuffer(struct ::wl_resource *buffer, int plane) Q_DECL_OVERRIDE; - void bindTextureToBuffer(struct ::wl_resource *buffer) Q_DECL_OVERRIDE; - void updateTextureForBuffer(struct ::wl_resource *buffer) Q_DECL_OVERRIDE; + QtWayland::ClientBuffer *createBufferFor(wl_resource *buffer); - QWaylandSurface::Origin origin(struct ::wl_resource *) const Q_DECL_OVERRIDE; +private: + Q_DISABLE_COPY(WaylandEglClientBufferIntegration) + QScopedPointer<WaylandEglClientBufferIntegrationPrivate> d_ptr; +}; - void *lockNativeBuffer(struct ::wl_resource *buffer) const Q_DECL_OVERRIDE; - void unlockNativeBuffer(void *native_buffer) const Q_DECL_OVERRIDE; +struct BufferState; - QSize bufferSize(struct ::wl_resource *buffer) const Q_DECL_OVERRIDE; +class WaylandEglClientBuffer : public QtWayland::ClientBuffer +{ +public: + QWaylandBufferRef::BufferFormatEgl bufferFormatEgl() const Q_DECL_OVERRIDE; + QSize size() const Q_DECL_OVERRIDE; + QWaylandSurface::Origin origin() const Q_DECL_OVERRIDE; + void *lockNativeBuffer() Q_DECL_OVERRIDE; + void unlockNativeBuffer(void *native_buffer) const Q_DECL_OVERRIDE; + QOpenGLTexture *toOpenGlTexture(int plane) Q_DECL_OVERRIDE; + void setCommitted(QRegion &damage) Q_DECL_OVERRIDE; private: - Q_DISABLE_COPY(WaylandEglClientBufferIntegration) - QScopedPointer<WaylandEglClientBufferIntegrationPrivate> d_ptr; + friend class WaylandEglClientBufferIntegration; + friend class WaylandEglClientBufferIntegrationPrivate; + + WaylandEglClientBuffer(WaylandEglClientBufferIntegration* integration, wl_resource *bufferResource); + + BufferState *d; + WaylandEglClientBufferIntegration *m_integration; }; QT_END_NAMESPACE |