KWin
Loading...
Searching...
No Matches
linuxdmabufv1clientbuffer.h
Go to the documentation of this file.
1/*
2 SPDX-FileCopyrightText: 2018 Fredrik Höglund <fredrik@kde.org>
3 SPDX-FileCopyrightText: 2019 Roman Gilg <subdiff@gmail.com>
4 SPDX-FileCopyrightText: 2021 Vlad Zahorodnii <vlad.zahorodnii@kde.org>
5 SPDX-FileCopyrightText: 2021 Xaver Hugl <xaver.hugl@gmail.com>
6
7 SPDX-License-Identifier: LGPL-2.1-only OR LGPL-3.0-only OR LicenseRef-KDE-Accepted-LGPL
8*/
9#pragma once
10
11#include "core/graphicsbuffer.h"
12
13#include <QHash>
14#include <QSet>
15#include <sys/types.h>
16#include <wayland-server.h>
17
18namespace KWin
19{
20
21class Display;
22class LinuxDmaBufV1ClientBufferIntegrationPrivate;
23class LinuxDmaBufV1FeedbackPrivate;
24class RenderBackend;
25
26class KWIN_EXPORT LinuxDmaBufV1Feedback : public QObject
27{
28 Q_OBJECT
29public:
31
32 enum class TrancheFlag : uint32_t {
33 Scanout = 1,
34 };
35 Q_DECLARE_FLAGS(TrancheFlags, TrancheFlag)
36
37 struct Tranche
38 {
39 dev_t device;
40 TrancheFlags flags;
41 QHash<uint32_t, QList<uint64_t>> formatTable;
42 };
48 void setTranches(const QList<Tranche> &tranches);
49
50private:
54 std::unique_ptr<LinuxDmaBufV1FeedbackPrivate> d;
55};
56
60class KWIN_EXPORT LinuxDmaBufV1ClientBufferIntegration : public QObject
61{
62 Q_OBJECT
63
64public:
67
68 RenderBackend *renderBackend() const;
69 void setRenderBackend(RenderBackend *renderBackend);
70
71 void setSupportedFormatsWithModifiers(const QList<LinuxDmaBufV1Feedback::Tranche> &tranches);
72
73private:
75 std::unique_ptr<LinuxDmaBufV1ClientBufferIntegrationPrivate> d;
76};
77
78} // namespace KWin
Class holding the Wayland server display loop.
Definition display.h:34
QHash< uint32_t, QList< uint64_t > > formatTable
struct _XDisplay Display