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_p.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// Qt-Security score:significant reason:default
4
5#pragma once
6
7#include <QtWaylandClient/private/qwaylandwindow_p.h>
9
10QT_BEGIN_NAMESPACE
11
12class QOpenGLFramebufferObject;
13
14namespace QtWaylandClient {
15
16class QWaylandGLContext;
17
18class Q_WAYLANDCLIENT_EXPORT QWaylandEglWindow : public QWaylandWindow
19{
21public:
25 void ensureSize() override;
26 QSize bufferSize() const;
27
28 void createSurface(const QSize &initialSize);
30 QRect contentsRect() const;
31
32 EGLSurface eglSurface() const;
33 GLuint contentFBO() const;
34 GLuint contentTexture() const;
35 bool needToUpdateContentFBO() const { return decoration() && (m_resize || !m_contentFBO); }
36
37 void bindContentFBO();
38
40
42
43private:
45 struct wl_egl_window *m_waylandEglWindow = nullptr;
46
47 // Locks any manipulation of the eglSurface size
50 mutable bool m_resize = false;
51 mutable QOpenGLFramebufferObject *m_contentFBO = nullptr;
52
53 // Size of the buffer used by QWaylandWindow
54 // This is always written to from the main thread, potentially read from the rendering thread
57
58 // Size used in the last call to wl_egl_window_resize, only updated from the rendering thread
60};
61
62}
63
64QT_END_NAMESPACE
static const char * qwaylandegl_threadedgl_blacklist_vendor[]
EGLDisplay(* PFNEGLGETPLATFORMDISPLAYEXTPROC)(EGLenum platform, void *native_display, const EGLint *attrib_list)