Qt
Internal/Contributor docs for the Qt SDK. Note: These are NOT official API docs; those are found at https://doc.qt.io/
Loading...
Searching...
No Matches
qwaylandbrcmeglwindow.h
Go to the documentation of this file.
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 QWAYLANDBRCMEGLWINDOW_H
5#define QWAYLANDBRCMEGLWINDOW_H
6
7#include <QtWaylandClient/private/qwaylandwindow_p.h>
9
10#include <QMutex>
11
12#include <EGL/egl.h>
13
15
16namespace QtWaylandClient {
17
19
21{
23public:
26 WindowType windowType() const override;
27 void setGeometry(const QRect &rect) override;
28
29 QSurfaceFormat format() const override;
30
31 bool makeCurrent(EGLContext context);
32 void swapBuffers();
33
34private:
35 void createEglSurfaces();
36 void destroyEglSurfaces();
37
38 QWaylandBrcmEglIntegration *m_eglIntegration = nullptr;
39 struct wl_egl_window *m_waylandEglWindow = nullptr;
40
41 const QWaylandWindow *m_parentWindow = nullptr;
42
43 EGLint m_globalImages[3*5];
44 EGLSurface m_eglSurfaces[3];
45
46 QWaylandBrcmBuffer *m_buffers[3];
47 QSurfaceFormat m_format;
48
49 struct wl_event_queue *m_eventQueue = nullptr;
50
51 int m_current = 0;
52 int m_count = 0;
53};
54
55}
56
57QT_END_NAMESPACE
58
59#endif // QWAYLANDBRCMEGLWINDOW_H
void * nativeResourceForContext(NativeResource resource, QPlatformOpenGLContext *context) override
QOpenGLContext * createOpenGLContext(EGLContext context, EGLDisplay contextDisplay, QOpenGLContext *shareContext) const override
void * nativeResource(NativeResource resource) override
QPlatformOpenGLContext * createPlatformOpenGLContext(const QSurfaceFormat &glFormat, QPlatformOpenGLContext *share) const override
void initialize(QWaylandDisplay *waylandDisplay) override
void setGeometry(const QRect &rect) override
This function is called by Qt whenever a window is moved or resized using the QWindow API.
QSurfaceFormat format() const override
Returns the actual surface format of the window.