1// Copyright (C) 2020 Klaralvdalens Datakonsult AB (KDAB).
2// Copyright (C) 2016 Paul Lemire <paul.lemire350@gmail.com>
3// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
4
5#ifndef QT3DRENDER_DEBUG_COMMANDEXECUTER_H
6#define QT3DRENDER_DEBUG_COMMANDEXECUTER_H
7
8//
9// W A R N I N G
10// -------------
11//
12// This file is not part of the Qt API. It exists for the convenience
13// of other Qt classes. This header file may change from version to
14// version without notice, or even be removed.
15//
16// We mean it.
17//
18
19#include <vector>
20#include <QVariant>
21#include <QMutex>
22
23QT_BEGIN_NAMESPACE
24
25namespace Qt3DCore {
26
27namespace Debug {
28class AsynchronousCommandReply;
29} // Debug
30
31} // Qt3DCore
32
33namespace Qt3DRender {
34
35namespace Render {
36namespace Rhi {
37class Renderer;
38class RenderView;
39} // Rhi
40} // Render
41
42namespace DebugRhi {
43
44class CommandExecuter
45{
46public:
47 explicit CommandExecuter(Render::Rhi::Renderer *renderer);
48
49 void performAsynchronousCommandExecution(const std::vector<Render::Rhi::RenderView *> &views);
50
51 QVariant executeCommand(const QStringList &args);
52
53private:
54 Render::Rhi::Renderer *m_renderer;
55 std::vector<Qt3DCore::Debug::AsynchronousCommandReply *> m_pendingCommands;
56 QMutex m_pendingCommandsMutex;
57};
58
59} // DebugRhi
60
61} // Qt3DRender
62
63QT_END_NAMESPACE
64
65#endif // QT3DRENDER_DEBUG_COMMANDEXECUTER_H
66

source code of qt3d/src/plugins/renderers/rhi/renderer/commandexecuter_p.h