Remove the EglStream controller interface

As KWin will no longer use EglStreams it is now unnecessary
This commit is contained in:
Xaver Hugl 2021-11-10 12:29:25 +01:00
parent 07a1db9b51
commit 26233a8dfb
3 changed files with 0 additions and 115 deletions

View file

@ -20,7 +20,6 @@ set(SERVER_LIB_SRCS
dpms_interface.cpp dpms_interface.cpp
drmclientbuffer.cpp drmclientbuffer.cpp
drmleasedevice_v1_interface.cpp drmleasedevice_v1_interface.cpp
eglstream_controller_interface.cpp
fakeinput_interface.cpp fakeinput_interface.cpp
filtered_display.cpp filtered_display.cpp
idle_interface.cpp idle_interface.cpp
@ -225,11 +224,6 @@ ecm_add_qtwayland_server_protocol_kde(SERVER_LIB_SRCS
BASENAME xdg-decoration-unstable-v1 BASENAME xdg-decoration-unstable-v1
) )
ecm_add_qtwayland_server_protocol_kde(SERVER_LIB_SRCS
PROTOCOL ${PLASMA_WAYLAND_PROTOCOLS_DIR}/wayland-eglstream-controller.xml
BASENAME wl-eglstream-controller
)
ecm_add_qtwayland_server_protocol_kde(SERVER_LIB_SRCS ecm_add_qtwayland_server_protocol_kde(SERVER_LIB_SRCS
PROTOCOL ${PLASMA_WAYLAND_PROTOCOLS_DIR}/keystate.xml PROTOCOL ${PLASMA_WAYLAND_PROTOCOLS_DIR}/keystate.xml
BASENAME keystate BASENAME keystate
@ -347,7 +341,6 @@ set(SERVER_LIB_HEADERS
dpms_interface.h dpms_interface.h
drmclientbuffer.h drmclientbuffer.h
drmleasedevice_v1_interface.h drmleasedevice_v1_interface.h
eglstream_controller_interface.h
fakeinput_interface.h fakeinput_interface.h
filtered_display.h filtered_display.h
idle_interface.h idle_interface.h

View file

@ -1,64 +0,0 @@
/*
SPDX-FileCopyrightText: 2019 NVIDIA Inc.
SPDX-License-Identifier: LGPL-2.1-only OR LGPL-3.0-only OR LicenseRef-KDE-Accepted-LGPL
*/
#include "eglstream_controller_interface.h"
#include "clientconnection.h"
#include "display.h"
#include "logging.h"
#include <qwayland-server-wl-eglstream-controller.h>
#include <wayland-util.h>
namespace KWaylandServer
{
static const quint32 s_version = 1;
class EglStreamControllerInterfacePrivate : public QtWaylandServer::wl_eglstream_controller
{
public:
EglStreamControllerInterfacePrivate(EglStreamControllerInterface *controller, Display *display);
EglStreamControllerInterface *q;
protected:
void eglstream_controller_attach_eglstream_consumer(Resource *resource, wl_resource *wl_surface, wl_resource *eglStream) override;
void
eglstream_controller_attach_eglstream_consumer_attribs(Resource *resource, wl_resource *wl_surface, wl_resource *eglStream, wl_array *attribs) override;
};
void EglStreamControllerInterfacePrivate::eglstream_controller_attach_eglstream_consumer(Resource *resource, wl_resource *wl_surface, wl_resource *eglStream)
{
wl_array noAttribs = {0, 0, nullptr};
eglstream_controller_attach_eglstream_consumer_attribs(resource, wl_surface, eglStream, &noAttribs);
}
void EglStreamControllerInterfacePrivate::eglstream_controller_attach_eglstream_consumer_attribs(Resource *resource,
wl_resource *wl_surface,
wl_resource *eglStream,
wl_array *attribs)
{
SurfaceInterface *surface = SurfaceInterface::get(wl_surface);
if (!surface) {
wl_resource_post_error(resource->handle, 0, "Invalid surface");
return;
}
Q_EMIT q->streamConsumerAttached(surface, eglStream, attribs);
}
EglStreamControllerInterfacePrivate::EglStreamControllerInterfacePrivate(EglStreamControllerInterface *_q, Display *display)
: QtWaylandServer::wl_eglstream_controller(*display, s_version)
, q(_q)
{
}
EglStreamControllerInterface::~EglStreamControllerInterface() = default;
EglStreamControllerInterface::EglStreamControllerInterface(Display *display, QObject *parent)
: QObject(parent)
, d(new EglStreamControllerInterfacePrivate(this, display))
{
}
}

View file

@ -1,44 +0,0 @@
/*
SPDX-FileCopyrightText: 2019 NVIDIA Inc.
SPDX-License-Identifier: LGPL-2.1-only OR LGPL-3.0-only OR LicenseRef-KDE-Accepted-LGPL
*/
#pragma once
#include "surface_interface.h"
#include <KWaylandServer/kwaylandserver_export.h>
#include <QObject>
#include <wayland-util.h>
namespace KWaylandServer
{
class Display;
class EglStreamControllerInterfacePrivate;
/**
* @brief Represents the Global for the wl_eglstream_controller interface.
*
* This class handles requests (typically from the NVIDIA EGL driver) to attach
* a newly created EGL Stream to a Wayland surface, facilitating the sharing
* of buffer contents between client and compositor.
*
*/
class KWAYLANDSERVER_EXPORT EglStreamControllerInterface : public QObject
{
Q_OBJECT
public:
explicit EglStreamControllerInterface(Display *display, QObject *parent = nullptr);
~EglStreamControllerInterface() override;
Q_SIGNALS:
/**
* Emitted when a new stream attach request is received.
*/
void streamConsumerAttached(SurfaceInterface *surface, void *eglStream, wl_array *attribs);
private:
QScopedPointer<EglStreamControllerInterfacePrivate> d;
};
}