Qt
Internal/Contributor docs for the Qt SDK. Note: These are NOT official API docs; those are found at https://doc.qt.io/
Toggle main menu visibility
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
// Qt-Security score:critical reason:network-protocol
4
5
//
6
// W A R N I N G
7
// -------------
8
//
9
// This file is not part of the Qt API. It exists purely as an
10
// implementation detail. This header file may change from version to
11
// version without notice, or even be removed.
12
//
13
// We mean it.
14
//
15
16
#
ifndef
TEXTURESHARINGEXTENSION_H
17
#
define
TEXTURESHARINGEXTENSION_H
18
19
#
include
<
qpa
/
qwindowsysteminterface
.
h
>
20
#
include
<
QtWaylandClient
/
private
/
qwayland
-
wayland
.
h
>
21
#
include
<
QtWaylandClient
/
qwaylandclientextension
.
h
>
22
#
include
"qwayland-qt-texture-sharing-unstable-v1.h"
23
#
include
"private/qglobal_p.h"
24
25
QT_BEGIN_NAMESPACE
26
27
namespace
QtWaylandClient
{
28
class
QWaylandServerBuffer;
29
class
QWaylandServerBufferIntegration;
30
};
31
32
class
TextureSharingExtension
:
public
QWaylandClientExtensionTemplate
<
TextureSharingExtension
>
33
,
public
QtWayland
::
zqt_texture_sharing_v1
34
{
35
Q_OBJECT
36
public
:
37
TextureSharingExtension
();
38
39
public
Q_SLOTS
:
40
void
requestImage
(
const
QString
&
key
);
41
void
abandonImage
(
const
QString &key);
42
43
Q_SIGNALS
:
44
void
bufferReceived
(
QtWaylandClient
::
QWaylandServerBuffer
*
buffer
,
const
QString
&
key
);
45
46
private
:
47
void
zqt_texture_sharing_v1_provide_buffer
(
struct
::qt_server_buffer *buffer,
const
QString &key)
override
;
48
void
zqt_texture_sharing_v1_image_failed
(
const
QString &key,
const
QString &message)
override
;
49
QtWaylandClient
::QWaylandServerBufferIntegration *m_server_buffer_integration =
nullptr
;
50
};
51
52
QT_END_NAMESPACE
53
54
#
endif
// TEXTURESHARINGEXTENSION_H
SharedTextureFactory::createTexture
QSGTexture * createTexture(QQuickWindow *window) const override
This function is called on the scene graph rendering thread to create a QSGTexture instance from the ...
Definition
sharedtextureprovider.cpp:56
SharedTextureFactory::SharedTextureFactory
SharedTextureFactory(const QtWaylandClient::QWaylandServerBuffer *buffer, const QString &id, SharedTextureRegistry *registry)
Definition
sharedtextureprovider.cpp:32
SharedTextureFactory::textureSize
QSize textureSize() const override
Returns the size of the texture.
Definition
sharedtextureprovider.cpp:46
SharedTextureFactory::~SharedTextureFactory
~SharedTextureFactory() override
Definition
sharedtextureprovider.cpp:37
SharedTextureFactory::textureByteCount
int textureByteCount() const override
Returns the number of bytes of memory the texture consumes.
Definition
sharedtextureprovider.cpp:51
SharedTextureImageResponse
Definition
qwltexturesharingextension.cpp:70
SharedTextureProvider
Definition
sharedtextureprovider_p.h:60
SharedTextureProvider::SharedTextureProvider
SharedTextureProvider()
Definition
sharedtextureprovider.cpp:229
SharedTextureProvider::~SharedTextureProvider
~SharedTextureProvider() override
Definition
sharedtextureprovider.cpp:240
SharedTextureProvider::requestImageResponse
QQuickImageResponse * requestImageResponse(const QString &id, const QSize &requestedSize) override
Implement this method to return the job that will provide the texture with id.
Definition
sharedtextureprovider.cpp:245
SharedTextureRegistry
Definition
sharedtextureprovider_p.h:32
SharedTextureRegistry::bufferForId
const QtWaylandClient::QWaylandServerBuffer * bufferForId(const QString &id) const
Definition
sharedtextureprovider.cpp:87
SharedTextureRegistry::preinitialize
static bool preinitialize()
Definition
sharedtextureprovider.cpp:117
SharedTextureRegistry::abandonBuffer
void abandonBuffer(const QString &id)
Definition
sharedtextureprovider.cpp:102
SharedTextureRegistry::requestBuffer
void requestBuffer(const QString &id)
Definition
sharedtextureprovider.cpp:92
SharedTextureRegistry::~SharedTextureRegistry
~SharedTextureRegistry() override
Definition
sharedtextureprovider.cpp:82
TextureSharingExtension
Definition
texturesharingextension_p.h:34
TextureSharingExtension::abandonImage
void abandonImage(const QString &key)
Definition
texturesharingextension.cpp:45
TextureSharingExtension::zqt_texture_sharing_v1_image_failed
void zqt_texture_sharing_v1_image_failed(const QString &key, const QString &message) override
Definition
texturesharingextension.cpp:35
QT_BEGIN_NAMESPACE
Combined button and popup list for selecting options.
Definition
qsequentialanimationgroup.cpp:47
QtWaylandClient
Definition
qwaylandclientextension.h:16
qtwayland
src
imports
texture-sharing
texturesharingextension_p.h
Generated on
for Qt by
1.18.0