From 26233a8dfba9103779fa6ad6d50769a41fefdff1 Mon Sep 17 00:00:00 2001 From: Xaver Hugl Date: Wed, 10 Nov 2021 12:29:25 +0100 Subject: [PATCH] Remove the EglStream controller interface As KWin will no longer use EglStreams it is now unnecessary --- src/wayland/CMakeLists.txt | 7 -- .../server/eglstream_controller_interface.cpp | 64 ------------------- .../server/eglstream_controller_interface.h | 44 ------------- 3 files changed, 115 deletions(-) delete mode 100644 src/wayland/server/eglstream_controller_interface.cpp delete mode 100644 src/wayland/server/eglstream_controller_interface.h diff --git a/src/wayland/CMakeLists.txt b/src/wayland/CMakeLists.txt index 3b98a01b49..5d6f30c7a7 100644 --- a/src/wayland/CMakeLists.txt +++ b/src/wayland/CMakeLists.txt @@ -20,7 +20,6 @@ set(SERVER_LIB_SRCS dpms_interface.cpp drmclientbuffer.cpp drmleasedevice_v1_interface.cpp - eglstream_controller_interface.cpp fakeinput_interface.cpp filtered_display.cpp idle_interface.cpp @@ -225,11 +224,6 @@ ecm_add_qtwayland_server_protocol_kde(SERVER_LIB_SRCS 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 PROTOCOL ${PLASMA_WAYLAND_PROTOCOLS_DIR}/keystate.xml BASENAME keystate @@ -347,7 +341,6 @@ set(SERVER_LIB_HEADERS dpms_interface.h drmclientbuffer.h drmleasedevice_v1_interface.h - eglstream_controller_interface.h fakeinput_interface.h filtered_display.h idle_interface.h diff --git a/src/wayland/server/eglstream_controller_interface.cpp b/src/wayland/server/eglstream_controller_interface.cpp deleted file mode 100644 index 63b6fa241d..0000000000 --- a/src/wayland/server/eglstream_controller_interface.cpp +++ /dev/null @@ -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 -#include - -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)) -{ -} - -} diff --git a/src/wayland/server/eglstream_controller_interface.h b/src/wayland/server/eglstream_controller_interface.h deleted file mode 100644 index 0b0e28ae1f..0000000000 --- a/src/wayland/server/eglstream_controller_interface.h +++ /dev/null @@ -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 -#include -#include - -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 d; -}; - -}