File indexing completed on 2024-02-25 17:23:44

0001 /*
0002     KWin - the KDE window manager
0003     This file is part of the KDE project.
0004 
0005     SPDX-FileCopyrightText: 2019 Roman Gilg <subdiff@gmail.com>
0006 
0007     SPDX-License-Identifier: GPL-2.0-or-later
0008 */
0009 #pragma once
0010 
0011 #include <kwin_export.h>
0012 
0013 #include "wayland/linuxdmabufv1clientbuffer.h"
0014 
0015 namespace KWin
0016 {
0017 
0018 class KWIN_EXPORT LinuxDmaBufV1ClientBuffer : public KWaylandServer::LinuxDmaBufV1ClientBuffer
0019 {
0020 public:
0021     LinuxDmaBufV1ClientBuffer(DmaBufAttributes &&attrs, quint32 flags);
0022     ~LinuxDmaBufV1ClientBuffer() override;
0023 };
0024 
0025 class KWIN_EXPORT LinuxDmaBufV1RendererInterface : public KWaylandServer::LinuxDmaBufV1ClientBufferIntegration::RendererInterface
0026 {
0027 public:
0028     explicit LinuxDmaBufV1RendererInterface();
0029     ~LinuxDmaBufV1RendererInterface() override;
0030 
0031     KWaylandServer::LinuxDmaBufV1ClientBuffer *importBuffer(DmaBufAttributes &&attrs, quint32 flags) override;
0032 
0033 protected:
0034     void setSupportedFormatsAndModifiers(const QVector<KWaylandServer::LinuxDmaBufV1Feedback::Tranche> &tranches);
0035 };
0036 
0037 }