2021-07-20 17:02:13 +00:00
|
|
|
/*
|
|
|
|
SPDX-FileCopyrightText: 2021 Vlad Zahorodnii <vlad.zahorodnii@kde.org>
|
|
|
|
|
|
|
|
SPDX-License-Identifier: LGPL-2.1-only OR LGPL-3.0-only OR LicenseRef-KDE-Accepted-LGPL
|
|
|
|
*/
|
|
|
|
|
|
|
|
#pragma once
|
|
|
|
|
2023-04-15 17:05:45 +00:00
|
|
|
#include "kwin_export.h"
|
|
|
|
|
|
|
|
#include <QObject>
|
2021-07-20 17:02:13 +00:00
|
|
|
|
|
|
|
namespace KWaylandServer
|
|
|
|
{
|
2023-04-15 17:05:45 +00:00
|
|
|
|
|
|
|
class Display;
|
2023-04-11 15:08:47 +00:00
|
|
|
class DrmClientBufferIntegrationPrivate;
|
2021-07-20 17:02:13 +00:00
|
|
|
|
|
|
|
/**
|
2023-04-11 15:08:47 +00:00
|
|
|
* The DrmClientBufferIntegration provides a stub implementation for the wl_drm
|
|
|
|
* protocol.
|
|
|
|
*
|
|
|
|
* It provides the minimum amount of information to Xwayland so it can run. No
|
2023-04-28 07:30:18 +00:00
|
|
|
* GraphicsBuffers are provided by the DrmClientBufferIntegration. Xwayland is
|
2023-04-11 15:08:47 +00:00
|
|
|
* expected to provide us linux dmabuf client buffers instead.
|
|
|
|
*
|
|
|
|
* Once the wl_drm protocol is no longer mandatory in Xwayland, this stub can be
|
|
|
|
* dropped.
|
2021-07-20 17:02:13 +00:00
|
|
|
*/
|
2023-04-15 17:05:45 +00:00
|
|
|
class KWIN_EXPORT DrmClientBufferIntegration : public QObject
|
2021-07-20 17:02:13 +00:00
|
|
|
{
|
|
|
|
Q_OBJECT
|
|
|
|
|
|
|
|
public:
|
|
|
|
explicit DrmClientBufferIntegration(Display *display);
|
2023-04-11 15:08:47 +00:00
|
|
|
~DrmClientBufferIntegration() override;
|
2021-07-20 17:02:13 +00:00
|
|
|
|
2023-04-11 15:08:47 +00:00
|
|
|
void setDevice(const QString &node);
|
2021-07-20 17:02:13 +00:00
|
|
|
|
2023-04-11 15:08:47 +00:00
|
|
|
private:
|
|
|
|
std::unique_ptr<DrmClientBufferIntegrationPrivate> d;
|
2021-07-20 17:02:13 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
} // namespace KWaylandServer
|