wayland: Drop ClientBuffer
The ClientBuffer type is empty now, most of the things have been upstreamed to the GraphicsBuffer type. So let's drop it to simplify the type hierarchy.master
parent
82c6538ee4
commit
0d2e361eca
@ -1,25 +0,0 @@
|
||||
/*
|
||||
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
|
||||
*/
|
||||
|
||||
#include "wayland/clientbuffer.h"
|
||||
#include "wayland/linuxdmabufv1clientbuffer.h"
|
||||
#include "wayland/shmclientbuffer.h"
|
||||
|
||||
namespace KWaylandServer
|
||||
{
|
||||
|
||||
ClientBuffer *ClientBuffer::get(wl_resource *resource)
|
||||
{
|
||||
if (auto buffer = LinuxDmaBufV1ClientBuffer::get(resource)) {
|
||||
return buffer;
|
||||
}
|
||||
if (auto buffer = ShmClientBuffer::get(resource)) {
|
||||
return buffer;
|
||||
}
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
} // namespace KWaylandServer
|
@ -1,32 +0,0 @@
|
||||
/*
|
||||
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
|
||||
|
||||
#include "core/graphicsbuffer.h"
|
||||
|
||||
struct wl_resource;
|
||||
|
||||
namespace KWaylandServer
|
||||
{
|
||||
|
||||
/**
|
||||
* The ClientBuffer class represents a client buffer.
|
||||
*
|
||||
* While the ClientBuffer is referenced, it won't be destroyed. Note that the client can
|
||||
* still destroy the wl_buffer object while the ClientBuffer is referenced by the compositor.
|
||||
* You can use the isDestroyed() function to check whether the wl_buffer object has been
|
||||
* destroyed.
|
||||
*/
|
||||
class KWIN_EXPORT ClientBuffer : public KWin::GraphicsBuffer
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
static ClientBuffer *get(wl_resource *resource);
|
||||
};
|
||||
|
||||
} // namespace KWaylandServer
|
Loading…
Reference in New Issue