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
qquickrendertarget_p.h
Go to the documentation of this file.
1// Copyright (C) 2020 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 QQUICKRENDERTARGET_P_H
6#define QQUICKRENDERTARGET_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
19#include <QtQuick/private/qtquickglobal_p.h>
21#include <QAtomicInt>
22
23QT_BEGIN_NAMESPACE
24
25class QRhi;
27
28class Q_QUICK_EXPORT QQuickRenderTargetPrivate
29{
30public:
31 static QQuickRenderTargetPrivate *get(QQuickRenderTarget *rt) { return rt->d; }
32 static const QQuickRenderTargetPrivate *get(const QQuickRenderTarget *rt) { return rt->d; }
33 QQuickRenderTargetPrivate();
34 QQuickRenderTargetPrivate(const QQuickRenderTargetPrivate &other);
35 bool resolve(QRhi *rhi, QQuickWindowRenderTarget *dst);
36
37 enum class Type {
38 Null,
39 NativeTexture,
40 NativeTextureArray,
41 NativeRenderbuffer,
42 RhiRenderTarget,
43 PaintDevice
44 };
45
46 QAtomicInt ref;
47 Type type = Type::Null;
48 QSize pixelSize;
49 qreal devicePixelRatio = 1.0;
50 int sampleCount = 1;
51 struct NativeTexture {
52 quint64 object;
53 int layoutOrState;
54 uint rhiFormat;
55 uint rhiFormatFlags;
56 uint rhiViewFormat;
57 uint rhiViewFormatFlags;
58 };
59 struct NativeTextureArray {
60 quint64 object;
61 int layoutOrState;
62 int arraySize;
63 uint rhiFormat;
64 uint rhiFormatFlags;
65 uint rhiViewFormat;
66 uint rhiViewFormatFlags;
67 };
68 union {
69 NativeTexture nativeTexture;
70 NativeTextureArray nativeTextureArray;
71 quint64 nativeRenderbufferObject;
72 QRhiRenderTarget *rhiRt;
73 QPaintDevice *paintDevice;
74 } u;
75
76 QRhiTexture *customDepthTexture = nullptr;
77 bool mirrorVertically = false;
78 bool multisampleResolve = false;
79};
80
81QT_END_NAMESPACE
82
83#endif // QQUICKRENDERTARGET_P_H
\inmodule QtGuiPrivate \inheaderfile rhi/qrhi.h
Definition qrhi.h:577
\inmodule QtGuiPrivate \inheaderfile rhi/qrhi.h
Definition qrhi.h:621
static bool createRhiRenderTargetWithRenderBuffer(QRhiRenderBuffer *renderBuffer, const QSize &pixelSize, int sampleCount, QRhi *rhi, QQuickWindowRenderTarget *dst)
static bool createRhiRenderTargetWithDepthTexture(QRhiTexture *texture, QRhiTexture *depthTexture, const QSize &pixelSize, int sampleCount, bool multisampleResolve, QRhi *rhi, QQuickWindowRenderTarget *dst)
static bool createRhiRenderTargetMultiView(QRhiTexture *texture, QRhiTexture *maybeCustomDepthTexture, const QSize &pixelSize, int arraySize, int sampleCount, bool multisampleResolve, QRhi *rhi, QQuickWindowRenderTarget *dst)
static bool createRhiRenderTarget(QRhiTexture *texture, const QSize &pixelSize, int sampleCount, bool multisampleResolve, QRhi *rhi, QQuickWindowRenderTarget *dst)