1 | // Copyright (C) 2016 The Qt Company Ltd. |
---|---|
2 | // SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only |
3 | |
4 | // |
5 | // W A R N I N G |
6 | // ------------- |
7 | // |
8 | // This file is not part of the Qt API. It exists purely as an |
9 | // implementation detail. This header file may change from version to |
10 | // version without notice, or even be removed. |
11 | // |
12 | // We mean it. |
13 | // |
14 | |
15 | #ifndef QWAYLANDEGLINTEGRATION_H |
16 | #define QWAYLANDEGLINTEGRATION_H |
17 | |
18 | #include <QtWaylandClient/private/qwaylandclientbufferintegration_p.h> |
19 | |
20 | #include "qwaylandeglinclude_p.h" |
21 | |
22 | QT_BEGIN_NAMESPACE |
23 | |
24 | class QWindow; |
25 | |
26 | namespace QtWaylandClient { |
27 | |
28 | class QWaylandWindow; |
29 | |
30 | class Q_WAYLANDCLIENT_EXPORT QWaylandEglClientBufferIntegration : public QWaylandClientBufferIntegration |
31 | { |
32 | public: |
33 | QWaylandEglClientBufferIntegration(); |
34 | ~QWaylandEglClientBufferIntegration() override; |
35 | |
36 | void initialize(QWaylandDisplay *display) override; |
37 | bool isValid() const override; |
38 | bool supportsThreadedOpenGL() const override; |
39 | bool supportsWindowDecoration() const override; |
40 | |
41 | QWaylandWindow *createEglWindow(QWindow *window) override; |
42 | QPlatformOpenGLContext *createPlatformOpenGLContext(const QSurfaceFormat &glFormat, QPlatformOpenGLContext *share) const override; |
43 | |
44 | void *nativeResource(NativeResource resource) override; |
45 | void *nativeResourceForContext(NativeResource resource, QPlatformOpenGLContext *context) override; |
46 | |
47 | EGLDisplay eglDisplay() const; |
48 | |
49 | private: |
50 | QWaylandDisplay *m_display = nullptr; |
51 | |
52 | EGLDisplay m_eglDisplay = EGL_NO_DISPLAY; |
53 | bool m_supportsThreading = false; |
54 | }; |
55 | |
56 | QT_END_NAMESPACE |
57 | |
58 | } |
59 | |
60 | #endif // QWAYLANDEGLINTEGRATION_H |
61 |