| 1 | // Copyright (C) 2020 The Qt Company Ltd. | 
| 2 | // SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only | 
| 3 |  | 
| 4 | #ifndef QWAYLANDCLIENTBUFFERINTEGRATION_H | 
| 5 | #define QWAYLANDCLIENTBUFFERINTEGRATION_H | 
| 6 |  | 
| 7 | // | 
| 8 | //  W A R N I N G | 
| 9 | //  ------------- | 
| 10 | // | 
| 11 | // This file is not part of the Qt API.  It exists purely as an | 
| 12 | // implementation detail.  This header file may change from version to | 
| 13 | // version without notice, or even be removed. | 
| 14 | // | 
| 15 | // We mean it. | 
| 16 | // | 
| 17 |  | 
| 18 | #include <QtWaylandCompositor/qtwaylandcompositorglobal.h> | 
| 19 | #include <QtWaylandCompositor/qwaylandsurface.h> | 
| 20 | #include <QtWaylandCompositor/qwaylandbufferref.h> | 
| 21 | #include <QtCore/QSize> | 
| 22 | #include <QtCore/private/qglobal_p.h> | 
| 23 | #include <wayland-server-core.h> | 
| 24 |  | 
| 25 | QT_BEGIN_NAMESPACE | 
| 26 |  | 
| 27 | class QWaylandCompositor; | 
| 28 | class QOpenGLTexture; | 
| 29 |  | 
| 30 | namespace QtWayland { | 
| 31 | class Display; | 
| 32 |  | 
| 33 | class Q_WAYLANDCOMPOSITOR_EXPORT ClientBufferIntegration | 
| 34 | { | 
| 35 | public: | 
| 36 |     ClientBufferIntegration(); | 
| 37 |     virtual ~ClientBufferIntegration() { } | 
| 38 |  | 
| 39 |     void setCompositor(QWaylandCompositor *compositor) { m_compositor = compositor; } | 
| 40 |     QWaylandCompositor *compositor() const { return m_compositor; } | 
| 41 |  | 
| 42 |     virtual void initializeHardware(struct ::wl_display *display) = 0; | 
| 43 |  | 
| 44 |     virtual ClientBuffer *createBufferFor(struct ::wl_resource *buffer) = 0; | 
| 45 |     virtual bool isProtected(struct ::wl_resource *buffer) { Q_UNUSED(buffer); return false; } | 
| 46 |  | 
| 47 | protected: | 
| 48 |     QWaylandCompositor *m_compositor = nullptr; | 
| 49 | }; | 
| 50 |  | 
| 51 | } | 
| 52 |  | 
| 53 | QT_END_NAMESPACE | 
| 54 |  | 
| 55 | #endif // QWAYLANDCLIENTBUFFERINTEGRATION_H | 
| 56 |  |