Qt
Internal/Contributor docs for the Qt SDK. Note: These are NOT official API docs; those are found at https://doc.qt.io/
Toggle main menu visibility
Loading...
Searching...
No Matches
vsp2hardwarelayerintegration.h
Go to the documentation of this file.
1
// Copyright (C) 2018 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
VSP2HARDWARELAYERINTEGRATION_H
6
#
define
VSP2HARDWARELAYERINTEGRATION_H
7
8
#
include
<
QtWaylandCompositor
/
private
/
qwlhardwarelayerintegration_p
.
h
>
9
#
include
<
private
/
qobject_p
.
h
>
10
11
#
include
<
QPoint
>
12
#
include
<
QSize
>
13
14
struct
wl_kms_buffer;
15
16
QT_BEGIN_NAMESPACE
17
18
namespace
QNativeInterface::
Private
{
19
struct
QVsp2Screen;
20
}
21
22
class
QScreen;
23
class
QWaylandSurface;
24
class
QWaylandQuickHardwareLayer;
25
26
class
Vsp2Layer
;
27
28
class
Vsp2HardwareLayerIntegration
:
public
QtWayland
::
HardwareLayerIntegration
29
{
30
Q_OBJECT
31
public
:
32
explicit
Vsp2HardwareLayerIntegration
();
33
34
void
add
(QWaylandQuickHardwareLayer *layer)
override
;
35
void
remove
(QWaylandQuickHardwareLayer *layer)
override
;
36
37
void
sendFrameCallbacks
();
38
QList
<
QSharedPointer
<
Vsp2Layer
>>
m_layers
;
39
private
:
40
void
enableVspLayers();
41
void
disableVspLayers();
42
void
sortLayersByDepth();
43
void
recreateVspLayers();
44
friend
class
Vsp2Layer
;
45
};
46
47
struct
Vsp2Buffer
48
{
49
explicit
Vsp2Buffer
() =
default
;
50
explicit
Vsp2Buffer
(wl_kms_buffer *kmsBuffer);
51
52
int
dmabufFd
= -1;
53
uint
bytesPerLine
= 0;
54
uint
drmPixelFormat
= 0;
55
QSize
size
;
56
};
57
58
class
Vsp2Layer
:
public
QObject
59
{
60
Q_OBJECT
61
public
:
62
explicit
Vsp2Layer
(
QWaylandQuickHardwareLayer
*
m_hwLayer
,
Vsp2HardwareLayerIntegration
*
integration
);
63
void
enableVspLayer
();
64
void
disableVspLayer
();
65
bool
isEnabled
() {
return
m_layerIndex != -1; }
66
QWaylandQuickHardwareLayer *
hwLayer
()
const
{
return
m_hwLayer; }
67
68
public
Q_SLOTS
:
69
void
handleBufferCommitted
();
70
void
handleSurfaceChanged
();
71
void
updatePosition
();
72
void
updateOpacity
();
73
74
private
:
75
wl_kms_buffer *nextKmsBuffer();
76
int
m_layerIndex = -1;
77
QVsp2Screen *m_screen =
nullptr
;
78
QPoint m_position;
79
QWaylandQuickHardwareLayer *m_hwLayer =
nullptr
;
80
QWaylandSurface *m_surface =
nullptr
;
81
Vsp2Buffer
m_buffer;
82
};
83
84
QT_END_NAMESPACE
85
86
#
endif
// VSP2HARDWARELAYERINTEGRATION_H
Vsp2HardwareLayerIntegrationPlugin
Definition
main.cpp:10
Vsp2HardwareLayerIntegration
Definition
vsp2hardwarelayerintegration.h:29
Vsp2HardwareLayerIntegration::sendFrameCallbacks
void sendFrameCallbacks()
Definition
vsp2hardwarelayerintegration.cpp:227
Vsp2HardwareLayerIntegration::add
void add(QWaylandQuickHardwareLayer *layer) override
Definition
vsp2hardwarelayerintegration.cpp:207
Vsp2HardwareLayerIntegration::remove
void remove(QWaylandQuickHardwareLayer *layer) override
Definition
vsp2hardwarelayerintegration.cpp:215
Vsp2HardwareLayerIntegration::m_layers
QList< QSharedPointer< Vsp2Layer > > m_layers
Definition
vsp2hardwarelayerintegration.h:38
Vsp2Layer
Definition
vsp2hardwarelayerintegration.h:59
Vsp2Layer::updateOpacity
void updateOpacity()
Definition
vsp2hardwarelayerintegration.cpp:135
Vsp2Layer::updatePosition
void updatePosition()
Definition
vsp2hardwarelayerintegration.cpp:118
Vsp2Layer::disableVspLayer
void disableVspLayer()
Definition
vsp2hardwarelayerintegration.cpp:68
Vsp2Layer::handleSurfaceChanged
void handleSurfaceChanged()
Definition
vsp2hardwarelayerintegration.cpp:103
Vsp2Layer::isEnabled
bool isEnabled()
Definition
vsp2hardwarelayerintegration.h:65
Vsp2Layer::hwLayer
QWaylandQuickHardwareLayer * hwLayer() const
Definition
vsp2hardwarelayerintegration.h:66
Vsp2Layer::enableVspLayer
void enableVspLayer()
Definition
vsp2hardwarelayerintegration.cpp:51
QNativeInterface
Definition
qnativeinterface.h:51
QT_BEGIN_NAMESPACE
Combined button and popup list for selecting options.
Definition
qsequentialanimationgroup.cpp:47
Vsp2Buffer
Definition
vsp2hardwarelayerintegration.h:48
Vsp2Buffer::size
QSize size
Definition
vsp2hardwarelayerintegration.h:55
Vsp2Buffer::drmPixelFormat
uint drmPixelFormat
Definition
vsp2hardwarelayerintegration.h:54
Vsp2Buffer::Vsp2Buffer
Vsp2Buffer()=default
Vsp2Buffer::Vsp2Buffer
Vsp2Buffer(wl_kms_buffer *kmsBuffer)
Definition
vsp2hardwarelayerintegration.cpp:25
Vsp2Buffer::bytesPerLine
uint bytesPerLine
Definition
vsp2hardwarelayerintegration.h:53
Vsp2Buffer::dmabufFd
int dmabufFd
Definition
vsp2hardwarelayerintegration.h:52
qtwayland
src
hardwareintegration
compositor
hardwarelayer
vsp2
vsp2hardwarelayerintegration.h
Generated on
for Qt by
1.18.0