Qt 6.x
The Qt SDK
Loading...
Searching...
No Matches
qwaylandshm.cpp
Go to the documentation of this file.
1// Copyright (C) 2016 LG Electronics Inc, author: <mikko.levonmaa@lge.com>
2// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
3#include <QtWaylandClient/private/qwaylandshm_p.h>
4#include <QtWaylandClient/private/qwaylanddisplay_p.h>
5
7
9
10namespace QtWaylandClient {
11
13 : QtWayland::wl_shm(display->wl_registry(), id, qMin(version, 1))
14{
15}
16
18{
19
20}
21
23{
24 m_formats << format;
25}
26
27bool QWaylandShm::formatSupported(wl_shm_format format) const
28{
29 return m_formats.contains(format);
30}
31
33{
34 wl_shm_format fmt = formatFrom(format);
35 return formatSupported(fmt);
36}
37
39{
41}
42
44{
46}
47
48}
49
Format
The following image formats are available in Qt.
Definition qimage.h:41
static QImage::Format fromWaylandShmFormat(wl_shm_format format)
static wl_shm_format fromQImageFormat(QImage::Format format)
bool formatSupported(wl_shm_format format) const
void shm_format(uint32_t format) override
QWaylandShm(QWaylandDisplay *display, int version, uint32_t id)
static wl_shm_format formatFrom(QImage::Format format)
struct wl_display * display
Definition linuxdmabuf.h:41
Combined button and popup list for selecting options.
constexpr const T & qMin(const T &a, const T &b)
Definition qminmax.h:40
GLenum GLuint id
[7]
GLint GLsizei GLsizei GLenum format
QVideoFrameFormat::PixelFormat fmt
bool contains(const AT &t) const noexcept
Definition qlist.h:44