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
>
8
#
include
"qwaylandeglclientbufferintegration_p.h"
9
10
QT_BEGIN_NAMESPACE
11
12
class
QOpenGLFramebufferObject;
13
14
namespace
QtWaylandClient
{
15
16
class
QWaylandGLContext;
17
18
class
Q_WAYLANDCLIENT_EXPORT
QWaylandEglWindow
:
public
QWaylandWindow
19
{
20
Q_OBJECT
21
public
:
22
QWaylandEglWindow
(
QWindow
*
window
,
QWaylandDisplay
*
display
);
23
~
QWaylandEglWindow
();
24
WindowType
windowType
()
const
override
;
25
void
ensureSize
()
override
;
26
QSize
bufferSize
()
const
;
27
28
void
createSurface
(
const
QSize
&
initialSize
);
29
void
updateSurfaceSize
(
const
QSize
&
bufferSize
);
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
39
void
invalidateSurface
()
override
;
40
41
QMutex
*
eglSurfaceLock
();
42
43
private
:
44
QWaylandEglClientBufferIntegration
*
m_clientBufferIntegration
=
nullptr
;
45
struct
wl_egl_window
*
m_waylandEglWindow
=
nullptr
;
46
47
// Locks any manipulation of the eglSurface size
48
QMutex
m_eglSurfaceLock
;
49
EGLSurface
m_eglSurface
=
EGL_NO_SURFACE
;
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
55
mutable
QReadWriteLock
m_bufferSizeLock
;
56
QSize
m_bufferSize
;
57
58
// Size used in the last call to wl_egl_window_resize, only updated from the rendering thread
59
QSize
m_appliedBufferSize
;
60
};
61
62
}
63
64
QT_END_NAMESPACE
QtWaylandClient::QWaylandEglWindow
Definition
qwaylandeglwindow_p.h:19
QtWaylandClient
Definition
qwaylandclientextension.h:16
QtWaylandClient::qwaylandegl_threadedgl_blacklist_vendor
static const char * qwaylandegl_threadedgl_blacklist_vendor[]
Definition
qwaylandeglclientbufferintegration.cpp:28
PFNEGLGETPLATFORMDISPLAYEXTPROC
EGLDisplay(* PFNEGLGETPLATFORMDISPLAYEXTPROC)(EGLenum platform, void *native_display, const EGLint *attrib_list)
Definition
qwaylandeglclientbufferintegration.cpp:17
EGL_PLATFORM_WAYLAND_KHR
#define EGL_PLATFORM_WAYLAND_KHR
Definition
qwaylandeglclientbufferintegration.cpp:21
qtbase
src
plugins
platforms
wayland
plugins
hardwareintegration
wayland-egl
qwaylandeglwindow_p.h
Generated on
for Qt by
1.16.1