| 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 | #ifndef QMINIMALEGLSCREEN_H |
| 5 | #define QMINIMALEGLSCREEN_H |
| 6 | |
| 7 | #include <qpa/qplatformscreen.h> |
| 8 | |
| 9 | #include <QtCore/QTextStream> |
| 10 | |
| 11 | #include <QtGui/private/qt_egl_p.h> |
| 12 | |
| 13 | QT_BEGIN_NAMESPACE |
| 14 | |
| 15 | class QPlatformOpenGLContext; |
| 16 | |
| 17 | class QMinimalEglScreen : public QPlatformScreen |
| 18 | { |
| 19 | public: |
| 20 | QMinimalEglScreen(EGLNativeDisplayType display); |
| 21 | ~QMinimalEglScreen(); |
| 22 | |
| 23 | QRect geometry() const override; |
| 24 | int depth() const override; |
| 25 | QImage::Format format() const override; |
| 26 | #ifndef QT_NO_OPENGL |
| 27 | QPlatformOpenGLContext *platformContext() const; |
| 28 | #endif |
| 29 | EGLSurface surface() const { return m_surface; } |
| 30 | |
| 31 | private: |
| 32 | void createAndSetPlatformContext() const; |
| 33 | void createAndSetPlatformContext(); |
| 34 | |
| 35 | QRect m_geometry; |
| 36 | int m_depth; |
| 37 | QImage::Format m_format; |
| 38 | QPlatformOpenGLContext *m_platformContext; |
| 39 | EGLDisplay m_dpy; |
| 40 | EGLSurface m_surface; |
| 41 | }; |
| 42 | |
| 43 | QT_END_NAMESPACE |
| 44 | #endif // QMINIMALEGLSCREEN_H |
| 45 |
