KWaylandServer

drmclientbuffer.h
1 /*
2  SPDX-FileCopyrightText: 2021 Vlad Zahorodnii <[email protected]>
3 
4  SPDX-License-Identifier: LGPL-2.1-only OR LGPL-3.0-only OR LicenseRef-KDE-Accepted-LGPL
5 */
6 
7 #pragma once
8 
9 #include "clientbuffer.h"
10 #include "clientbufferintegration.h"
11 
12 namespace KWaylandServer
13 {
14 class DrmClientBufferPrivate;
15 
16 /**
17  * The DrmClientBufferIntegration class provides support for wl_drm client buffers.
18  */
19 class KWAYLANDSERVER_EXPORT DrmClientBufferIntegration : public ClientBufferIntegration
20 {
21  Q_OBJECT
22 
23 public:
24  explicit DrmClientBufferIntegration(Display *display);
25 
26  ClientBuffer *createBuffer(::wl_resource *resource) override;
27 };
28 
29 /**
30  * The DrmClientBuffer class represents a wl_drm client buffer.
31  *
32  * Nowadays, the wl_drm protocol is de-facto deprecated with the introduction of the
33  * linux-dmabuf-v1 protocol. Note that Vulkan WSI in Mesa still prefers wl_drm, but
34  * that's about to change, https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4942/
35  */
36 class KWAYLANDSERVER_EXPORT DrmClientBuffer : public ClientBuffer
37 {
38  Q_OBJECT
39  Q_DECLARE_PRIVATE(DrmClientBuffer)
40 
41 public:
42  explicit DrmClientBuffer(wl_resource *resource, DrmClientBufferIntegration *integration);
43 
44  int textureFormat() const;
45 
46  QSize size() const override;
47  bool hasAlphaChannel() const override;
48  Origin origin() const override;
49 };
50 
51 } // namespace KWaylandServer
Class holding the Wayland server display loop.
Definition: display.h:47
Origin
This enum type is used to specify the corner where the origin is.
Definition: clientbuffer.h:41
The DrmClientBuffer class represents a wl_drm client buffer.
The DrmClientBufferIntegration class provides support for wl_drm client buffers.
The ClientBuffer class represents a client buffer.
Definition: clientbuffer.h:29
This file is part of the KDE documentation.
Documentation copyright © 1996-2021 The KDE developers.
Generated on Sat Oct 23 2021 23:08:27 by doxygen 1.8.11 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.