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
qwltextureorphanage_p.h
Go to the documentation of this file.
1
// Copyright (C) 2023 The Qt Company Ltd.
2
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only
3
// Qt-Security score:significant reason:default
4
5
#
ifndef
QWLTEXTUREORPHANAGE_P_H
6
#
define
QWLTEXTUREORPHANAGE_P_H
7
8
//
9
// W A R N I N G
10
// -------------
11
//
12
// This file is not part of the Qt API. It exists purely as an
13
// implementation detail. This header file may change from version to
14
// version without notice, or even be removed.
15
//
16
// We mean it.
17
//
18
19
#
include
<
QObject
>
20
#
include
<
QMutex
>
21
#
include
<
QLoggingCategory
>
22
#
include
<
QtWaylandCompositor
/
qtwaylandcompositorglobal
.
h
>
23
24
#
include
<
QtCore
/
qhash
.
h
>
25
26
QT_BEGIN_NAMESPACE
27
28
class
QOpenGLContext;
29
class
QOpenGLTexture;
30
31
Q_DECLARE_LOGGING_CATEGORY(qLcWTO)
32
33
namespace
QtWayland
{
34
35
class
Q_WAYLANDCOMPOSITOR_EXPORT
QWaylandTextureOrphanage
:
public
QObject
36
{
37
Q_OBJECT
38
39
public
:
40
QWaylandTextureOrphanage
(){};
41
~
QWaylandTextureOrphanage
();
42
43
static
QWaylandTextureOrphanage
*
instance
();
44
45
// texture that isn't needed anymore will be "take care of" (killed) appropriately
46
void
admitTexture
(
QOpenGLTexture
*
tex
,
QOpenGLContext
*
ctx
);
47
48
// uses QOpenGLContext::currentContext to call deleteTexturesByContext on all shared ctx
49
void
deleteTextures
();
50
51
public
Q_SLOTS
:
52
// uses sender() to call deleteTexturesByContext
53
void
onContextAboutToBeDestroyed
(
QOpenGLContext
*
ctx
);
54
55
private
:
56
void
deleteTexturesByContext
(
QOpenGLContext
*
ctx
);
57
58
// tracks all the orphanes that need to be deleted
59
QMultiHash
<
QOpenGLContext
*,
QOpenGLTexture
*>
m_orphanedTextures
;
60
61
QMutex
m_containerLock
;
62
};
63
64
}
// namespace QtWayland
65
66
QT_END_NAMESPACE
67
#
endif
QtWayland::QWaylandTextureOrphanage
Definition
qwltextureorphanage_p.h:36
QT_BEGIN_NAMESPACE
Combined button and popup list for selecting options.
Definition
qsequentialanimationgroup.cpp:47
QtWayland
Definition
qwaylanddisplay_p.h:54
qtwayland
src
compositor
hardware_integration
qwltextureorphanage_p.h
Generated on
for Qt by
1.16.1