kwin/src/linux_dmabuf.h
Vlad Zahorodnii 964c487d4f wayland: Switch to ClientBuffer
The main motivation behind the split is to simplify client buffer code
and allow adding new features easier, for example referencing the shm
pool when a shm buffer is destroyed, or monitoring for readable linux
dmabuf file descriptors, etc.

Also, a referenced ClientBuffer cannot be destroyed, unlike the old
BufferInterface.
2021-07-23 15:33:38 +00:00

43 lines
1.4 KiB
C++

/*
KWin - the KDE window manager
This file is part of the KDE project.
SPDX-FileCopyrightText: 2019 Roman Gilg <subdiff@gmail.com>
SPDX-License-Identifier: GPL-2.0-or-later
*/
#pragma once
#include <kwin_export.h>
#include <KWaylandServer/linuxdmabufv1clientbuffer.h>
namespace KWin
{
class KWIN_EXPORT LinuxDmaBufV1ClientBuffer : public KWaylandServer::LinuxDmaBufV1ClientBuffer
{
public:
LinuxDmaBufV1ClientBuffer(const QVector<KWaylandServer::LinuxDmaBufV1Plane> &planes,
quint32 format,
const QSize &size,
quint32 flags);
~LinuxDmaBufV1ClientBuffer() override;
};
class KWIN_EXPORT LinuxDmaBufV1RendererInterface : public KWaylandServer::LinuxDmaBufV1ClientBufferIntegration::RendererInterface
{
public:
explicit LinuxDmaBufV1RendererInterface();
~LinuxDmaBufV1RendererInterface() override;
KWaylandServer::LinuxDmaBufV1ClientBuffer *importBuffer(const QVector<KWaylandServer::LinuxDmaBufV1Plane> &planes,
quint32 format,
const QSize &size,
quint32 flags) override;
protected:
void setSupportedFormatsAndModifiers(const QHash<uint32_t, QSet<uint64_t>> &set);
};
}