Qt
Internal/Contributor docs for the Qt SDK. <b>Note:</b> These are NOT official API docs; those are found <a href='https://doc.qt.io/'>here</a>.
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
QT_BEGIN_NAMESPACE
24
25
class
QOpenGLContext
;
26
class
QOpenGLTexture
;
27
28
Q_DECLARE_LOGGING_CATEGORY
(qLcWTO)
29
30
namespace
QtWayland
{
31
32
class
Q_WAYLANDCOMPOSITOR_EXPORT
QWaylandTextureOrphanage
:
public
QObject
33
{
34
Q_OBJECT
35
36
public
:
37
QWaylandTextureOrphanage
(){};
38
~QWaylandTextureOrphanage
();
39
40
static
QWaylandTextureOrphanage
*instance();
41
42
// texture that isn't needed anymore will be "take care of" (killed) appropriately
43
void
admitTexture(
QOpenGLTexture
*tex,
QOpenGLContext
*
ctx
);
44
45
// uses QOpenGLContext::currentContext to call deleteTexturesByContext on all shared ctx
46
void
deleteTextures();
47
48
public
Q_SLOTS
:
49
// uses sender() to call deleteTexturesByContext
50
void
onContextAboutToBeDestroyed(
QOpenGLContext
*
ctx
);
51
52
private
:
53
void
deleteTexturesByContext(
QOpenGLContext
*
ctx
);
54
55
// tracks all the orphanes that need to be deleted
56
QMultiHash<QOpenGLContext *, QOpenGLTexture *> m_orphanedTextures;
57
58
QMutex
m_containerLock;
59
};
60
61
}
// namespace QtWayland
62
63
QT_END_NAMESPACE
64
#endif
QMutex
\inmodule QtCore
Definition
qmutex.h:281
QObject
\inmodule QtCore
Definition
qobject.h:103
QOpenGLContext
\inmodule QtGui
Definition
qopenglcontext.h:67
QOpenGLTexture
\inmodule QtGui
Definition
qopengltexture.h:22
QtWayland::QWaylandTextureOrphanage
Definition
qwltextureorphanage_p.h:33
QtWayland::QWaylandTextureOrphanage::QWaylandTextureOrphanage
QWaylandTextureOrphanage()
Definition
qwltextureorphanage_p.h:37
ctx
EGLContext ctx
Definition
dmabufserverbufferintegration.h:20
QT_BEGIN_NAMESPACE
Combined button and popup list for selecting options.
Definition
qstandardpaths_haiku.cpp:21
QT_END_NAMESPACE
Definition
qsharedpointer.cpp:1590
QtWayland
Definition
qwaylanddatadevice_p.h:34
Q_DECLARE_LOGGING_CATEGORY
#define Q_DECLARE_LOGGING_CATEGORY(name)
Definition
qloggingcategory.h:106
Q_OBJECT
#define Q_OBJECT
Definition
qtmetamacros.h:119
Q_SLOTS
#define Q_SLOTS
Definition
qtmetamacros.h:44
qtwayland
src
compositor
hardware_integration
qwltextureorphanage_p.h
Generated by
1.10.0