Debian Codegraph @

src/plugins/platforms/eglfs/deviceintegration/eglfs_kms_egldevice/qeglfskmsegldeviceintegration.h

raw
1 // Copyright (C) 2016 The Qt Company Ltd.
2 // Copyright (C) 2016 Pelagicore AG
3 // SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
4
5 #ifndef QEGLFSKMSEGLDEVICEINTEGRATION_H
6 #define QEGLFSKMSEGLDEVICEINTEGRATION_H
7
8 #include <private/qeglfskmsintegration_p.h>
9
10 #include <xf86drm.h>
11 #include <xf86drmMode.h>
12
13 #include <QtGui/private/qeglstreamconvenience_p.h>
14
15 QT_BEGIN_NAMESPACE
16
17 class QEglFSKmsEglDeviceIntegration : public QEglFSKmsIntegration
18 {
19 public:
20 QEglFSKmsEglDeviceIntegration();
21
22 QSurfaceFormat surfaceFormatFor(const QSurfaceFormat &inputFormat) const override;
23 EGLint surfaceType() const override;
24 EGLDisplay createDisplay(EGLNativeDisplayType nativeDisplay) override;
25 bool supportsSurfacelessContexts() const override;
26 bool supportsPBuffers() const override;
27 QEglFSWindow *createWindow(QWindow *window) const override;
28
29 EGLDeviceEXT eglDevice() const { return m_egl_device; }
30
31 protected:
32 QKmsDevice *createDevice() override;
33 QPlatformCursor *createCursor(QPlatformScreen *screen) const override;
34
35 private:
36 bool setup_kms();
37 bool query_egl_device();
38
39 EGLDeviceEXT m_egl_device;
40 QEGLStreamConvenience *m_funcs;
41
42 friend class QEglFSKmsEglDeviceWindow;
43 };
44
45 QT_END_NAMESPACE
46
47 #endif