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
texturesharingextension_p.h
Go to the documentation of this file.
1// Copyright (C) 2021 The Qt Company Ltd.
2// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
3
4//
5// W A R N I N G
6// -------------
7//
8// This file is not part of the Qt API. It exists purely as an
9// implementation detail. This header file may change from version to
10// version without notice, or even be removed.
11//
12// We mean it.
13//
14
15#ifndef TEXTURESHARINGEXTENSION_H
16#define TEXTURESHARINGEXTENSION_H
17
18#include <qpa/qwindowsysteminterface.h>
19#include <QtWaylandClient/private/qwayland-wayland.h>
20#include <QtWaylandClient/qwaylandclientextension.h>
21#include "qwayland-qt-texture-sharing-unstable-v1.h"
22#include "private/qglobal_p.h"
23
25
26namespace QtWaylandClient {
27 class QWaylandServerBuffer;
28 class QWaylandServerBufferIntegration;
29};
30
33{
35public:
37
38public Q_SLOTS:
39 void requestImage(const QString &key);
40 void abandonImage(const QString &key);
41
44
45private:
46 void zqt_texture_sharing_v1_provide_buffer(struct ::qt_server_buffer *buffer, const QString &key) override;
47 void zqt_texture_sharing_v1_image_failed(const QString &key, const QString &message) override;
48 QtWaylandClient::QWaylandServerBufferIntegration *m_server_buffer_integration = nullptr;
49};
50
51QT_END_NAMESPACE
52
53#endif // TEXTURESHARINGEXTENSION_H
QSGTexture * createTexture(QQuickWindow *window) const override
This function is called on the scene graph rendering thread to create a QSGTexture instance from the ...
SharedTextureFactory(const QtWaylandClient::QWaylandServerBuffer *buffer, const QString &id, SharedTextureRegistry *registry)
QSize textureSize() const override
Returns the size of the texture.
int textureByteCount() const override
Returns the number of bytes of memory the texture consumes.
QQuickImageResponse * requestImageResponse(const QString &id, const QSize &requestedSize) override
Implement this method to return the job that will provide the texture with id.
const QtWaylandClient::QWaylandServerBuffer * bufferForId(const QString &id) const
void abandonBuffer(const QString &id)
void requestBuffer(const QString &id)
void abandonImage(const QString &key)
void zqt_texture_sharing_v1_image_failed(const QString &key, const QString &message) override