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
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
14struct wl_kms_buffer;
15
16QT_BEGIN_NAMESPACE
17
18namespace QNativeInterface::Private {
19struct QVsp2Screen;
20}
21
22class QScreen;
23class QWaylandSurface;
24class QWaylandQuickHardwareLayer;
25
26class Vsp2Layer;
27
29{
31public:
33
34 void add(QWaylandQuickHardwareLayer *layer) override;
35 void remove(QWaylandQuickHardwareLayer *layer) override;
36
37 void sendFrameCallbacks();
39private:
40 void enableVspLayers();
41 void disableVspLayers();
42 void sortLayersByDepth();
43 void recreateVspLayers();
44 friend class Vsp2Layer;
45};
46
48{
49 explicit Vsp2Buffer() = default;
50 explicit Vsp2Buffer(wl_kms_buffer *kmsBuffer);
51
52 int dmabufFd = -1;
56};
57
58class Vsp2Layer : public QObject
59{
61public:
63 void enableVspLayer();
64 void disableVspLayer();
65 bool isEnabled() { return m_layerIndex != -1; }
66 QWaylandQuickHardwareLayer *hwLayer() const { return m_hwLayer; }
67
68public Q_SLOTS:
71 void updatePosition();
72 void updateOpacity();
73
74private:
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
84QT_END_NAMESPACE
85
86#endif // VSP2HARDWARELAYERINTEGRATION_H
void add(QWaylandQuickHardwareLayer *layer) override
void remove(QWaylandQuickHardwareLayer *layer) override
QList< QSharedPointer< Vsp2Layer > > m_layers
QWaylandQuickHardwareLayer * hwLayer() const
Combined button and popup list for selecting options.
Vsp2Buffer()=default
Vsp2Buffer(wl_kms_buffer *kmsBuffer)