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
4#ifndef SHMSERVERBUFFERINTEGRATION_H
5#define SHMSERVERBUFFERINTEGRATION_H
6
7#include <QtWaylandCompositor/private/qwlserverbufferintegration_p.h>
8
9#include "qwayland-server-shm-emulation-server-buffer.h"
10
11#include <QtGui/QImage>
12#include <QtGui/QWindow>
13#include <QtGui/qpa/qplatformnativeinterface.h>
14#include <QtGui/QGuiApplication>
15
16#include <QtWaylandCompositor/qwaylandcompositor.h>
17#include <QtWaylandCompositor/private/qwayland-server-server-buffer-extension.h>
18
19QT_BEGIN_NAMESPACE
20
21class ShmServerBufferIntegration;
22class QSharedMemory;
23
25{
26public:
27 ShmServerBuffer(ShmServerBufferIntegration *integration, const QImage &qimage, QtWayland::ServerBuffer::Format format);
29
30 struct ::wl_resource *resourceForClient(struct ::wl_client *) override;
31 bool bufferInUse() override;
33
34private:
35 ShmServerBufferIntegration *m_integration = nullptr;
36
37 QSharedMemory *m_shm = nullptr;
38 int m_width;
39 int m_height;
40 int m_bpl;
41 QOpenGLTexture *m_texture = nullptr;
42 QtWaylandServer::qt_shm_emulation_server_buffer::format m_shm_format;
43};
44
48{
49public:
52
53 bool initializeHardware(QWaylandCompositor *) override;
54
55 bool supportsFormat(QtWayland::ServerBuffer::Format format) const override;
56 QtWayland::ServerBuffer *createServerBufferFromImage(const QImage &qimage, QtWayland::ServerBuffer::Format format) override;
57
58
59private:
60};
61
62QT_END_NAMESPACE
63
64#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)