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
qwaylandeglwindow.cpp
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// Qt-Security score:significant reason:default
4
6
7#include <QtWaylandClient/private/qwaylandscreen_p.h>
8#include <QtWaylandClient/private/qwaylandsurface_p.h>
10
11#include <QtGui/private/qeglconvenience_p.h>
12
13#include <QDebug>
14#include <QtGui/QWindow>
15#include <qpa/qwindowsysteminterface.h>
16#include <QOpenGLFramebufferObject>
17#include <QOpenGLContext>
18
20
21namespace QtWaylandClient {
22
33
44
49
51{
52 // this is always called on the main thread
53 {
54 // keep a cache of the size that is safely accessible from the render thread
57 }
58}
59
65
67{
68 // potentially called from a render thread
69 // eglSurfaceLock should be locked before calling this method
70
72 return;
73
74 int current_width = 0;
75 int current_height = 0;
76 static bool disableResizeCheck = qgetenv("QT_WAYLAND_DISABLE_RESIZECHECK").toInt();
77
78 if (!disableResizeCheck) {
80 }
84 mOffset = QPoint();
85 m_resize = true;
86 }
87}
88
90{
91 // potentially called from a render thread
92 // eglSurfaceLock should be locked before calling this method
93
95 if (mSurface) {
97 if (Q_UNLIKELY(!eglWindow)) {
98 qCWarning(lcQpaWayland, "Could not create wl_egl_window with size %dx%d\n", initialSize.width(), initialSize.height());
99 return;
100 }
101
105
108 qCWarning(lcQpaWayland, "Could not create EGL surface (EGL error 0x%x)\n", eglGetError());
110 return;
111 }
112
116 }
117}
118
123
137
142
143}
144
145QT_END_NAMESPACE
146
147#include "moc_qwaylandeglwindow_p.cpp"
Combined button and popup list for selecting options.