Qt
Internal/Contributor docs for the Qt SDK. Note: These are NOT official API docs; those are found at https://doc.qt.io/
Loading...
Searching...
No Matches
shmserverbufferintegration.h
Go to the documentation of this file.
1// Copyright (C) 2017 The Qt Company Ltd.
2// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only
3// Qt-Security score:critical reason:network-protocol
4
5#ifndef SHMSERVERBUFFERINTEGRATION_H
6#define SHMSERVERBUFFERINTEGRATION_H
7
8#include <QtWaylandCompositor/private/qwlserverbufferintegration_p.h>
9
10#include "qwayland-server-shm-emulation-server-buffer.h"
11
12#include <QtGui/QImage>
13#include <QtGui/QWindow>
14#include <QtGui/qpa/qplatformnativeinterface.h>
15#include <QtGui/QGuiApplication>
16
17#include <QtWaylandCompositor/qwaylandcompositor.h>
18#include <QtWaylandCompositor/private/qwayland-server-server-buffer-extension.h>
19
20QT_BEGIN_NAMESPACE
21
22class ShmServerBufferIntegration;
23class QSharedMemory;
24
26{
27public:
28 ShmServerBuffer(ShmServerBufferIntegration *integration, const QImage &qimage, QtWayland::ServerBuffer::Format format);
30
31 struct ::wl_resource *resourceForClient(struct ::wl_client *) override;
32 bool bufferInUse() override;
34
35private:
36 ShmServerBufferIntegration *m_integration = nullptr;
37
38 QSharedMemory *m_shm = nullptr;
39 int m_width;
40 int m_height;
41 int m_bpl;
42 QOpenGLTexture *m_texture = nullptr;
43 QtWaylandServer::qt_shm_emulation_server_buffer::format m_shm_format;
44};
45
49{
50public:
53
54 bool initializeHardware(QWaylandCompositor *) override;
55
56 bool supportsFormat(QtWayland::ServerBuffer::Format format) const override;
57 QtWayland::ServerBuffer *createServerBufferFromImage(const QImage &qimage, QtWayland::ServerBuffer::Format format) override;
58
59
60private:
61};
62
63QT_END_NAMESPACE
64
65#endif
bool initializeHardware(QWaylandCompositor *) override
bool supportsFormat(QtWayland::ServerBuffer::Format format) const override
QtWayland::ServerBuffer * createServerBufferFromImage(const QImage &qimage, QtWayland::ServerBuffer::Format format) override
QOpenGLTexture * toOpenGlTexture() override
ShmServerBuffer(ShmServerBufferIntegration *integration, const QImage &qimage, QtWayland::ServerBuffer::Format format)
Combined button and popup list for selecting options.