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
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
4#ifndef VSP2HARDWARELAYERINTEGRATION_H
5#define VSP2HARDWARELAYERINTEGRATION_H
6
7#include <QtWaylandCompositor/private/qwlhardwarelayerintegration_p.h>
8#include <private/qobject_p.h>
9
10#include <QPoint>
11#include <QSize>
12
13struct wl_kms_buffer;
14
16
18struct QVsp2Screen;
19}
20
21class QScreen;
22class QWaylandSurface;
24
25class Vsp2Layer;
26
28{
30public:
32
33 void add(QWaylandQuickHardwareLayer *layer) override;
35
36 void sendFrameCallbacks();
37 QList<QSharedPointer<Vsp2Layer>> m_layers;
38private:
39 void enableVspLayers();
40 void disableVspLayers();
41 void sortLayersByDepth();
42 void recreateVspLayers();
43 friend class Vsp2Layer;
44};
45
47{
48 explicit Vsp2Buffer() = default;
49 explicit Vsp2Buffer(wl_kms_buffer *kmsBuffer);
50
51 int dmabufFd = -1;
55};
56
57class Vsp2Layer : public QObject
58{
60public:
61 explicit Vsp2Layer(QWaylandQuickHardwareLayer *m_hwLayer, Vsp2HardwareLayerIntegration *integration);
62 void enableVspLayer();
63 void disableVspLayer();
64 bool isEnabled() { return m_layerIndex != -1; }
65 QWaylandQuickHardwareLayer *hwLayer() const { return m_hwLayer; }
66
67public Q_SLOTS:
70 void updatePosition();
71 void updateOpacity();
72
73private:
74 wl_kms_buffer *nextKmsBuffer();
75 int m_layerIndex = -1;
76 QVsp2Screen *m_screen = nullptr;
77 QPoint m_position;
78 QWaylandQuickHardwareLayer *m_hwLayer = nullptr;
79 QWaylandSurface *m_surface = nullptr;
80 Vsp2Buffer m_buffer;
81};
82
84
85#endif // VSP2HARDWARELAYERINTEGRATION_H
\inmodule QtCore
Definition qobject.h:103
\inmodule QtCore\reentrant
Definition qpoint.h:25
The QScreen class is used to query screen properties. \inmodule QtGui.
Definition qscreen.h:32
\inmodule QtCore
Definition qsize.h:25
\qmltype WaylandSurface \instantiates QWaylandSurface \inqmlmodule QtWayland.Compositor
void add(QWaylandQuickHardwareLayer *layer) override
void remove(QWaylandQuickHardwareLayer *layer) override
QList< QSharedPointer< Vsp2Layer > > m_layers
Vsp2Layer(QWaylandQuickHardwareLayer *m_hwLayer, Vsp2HardwareLayerIntegration *integration)
QWaylandQuickHardwareLayer * hwLayer() const
Combined button and popup list for selecting options.
EGLOutputLayerEXT layer
#define Q_OBJECT
#define Q_SLOTS
unsigned int uint
Definition qtypes.h:34
Vsp2Buffer()=default