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