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
qquickrendercontrol_p.h
Go to the documentation of this file.
1// Copyright (C) 2016 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:significant reason:default
4
5#ifndef QQUICKRENDERCONTROL_P_H
6#define QQUICKRENDERCONTROL_P_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 purely as an
13// implementation detail. This header file may change from version to
14// version without notice, or even be removed.
15//
16// We mean it.
17//
18
20#include <QtQuick/private/qsgcontext_p.h>
21
23
24class QRhi;
25class QRhiCommandBuffer;
26class QOffscreenSurface;
27class QQuickGraphicsConfiguration;
28
29class Q_QUICK_EXPORT QQuickRenderControlPrivate : public QObjectPrivate
30{
31public:
32 Q_DECLARE_PUBLIC(QQuickRenderControl)
33
34 enum FrameStatus {
35 NotRecordingFrame,
36 RecordingFrame,
37 DeviceLostInBeginFrame,
38 ErrorInBeginFrame
39 };
40
41 QQuickRenderControlPrivate(QQuickRenderControl *renderControl);
42
43 static QQuickRenderControlPrivate *get(QQuickRenderControl *renderControl) {
44 return renderControl->d_func();
45 }
46
47 static bool isRenderWindowFor(QQuickWindow *quickWin, const QWindow *renderWin);
48 virtual bool isRenderWindow(const QWindow *w);
49
50 static void cleanup();
51
52 void windowDestroyed();
53
54 void update();
55 void maybeUpdate();
56
57 bool initRhi();
58 void resetRhi(const QQuickGraphicsConfiguration &config);
59
60 QImage grab();
61
62 QQuickRenderControl *q;
63 bool initialized;
64 QQuickWindow *window;
65 static QSGContext *sg;
66 QSGRenderContext *rc;
67 QRhi *rhi;
68 bool ownRhi;
69 QRhiCommandBuffer *cb;
70 QOffscreenSurface *offscreenSurface;
71 int sampleCount;
72 FrameStatus frameStatus;
73};
74
75QT_END_NAMESPACE
76
77#endif // QQUICKRENDERCONTROL_P_H