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
qquickrhiitem_p.h
Go to the documentation of this file.
1// Copyright (C) 2023 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 QQUICKRHIITEM_P_H
6#define QQUICKRHIITEM_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 "qquickrhiitem.h"
20#include <QtQuick/QSGTextureProvider>
21#include <QtQuick/QSGSimpleTextureNode>
22#include <QtQuick/private/qquickitem_p.h>
23#include <rhi/qrhi.h>
24
26
28{
30
31public:
33
34 QSGTexture *texture() const override;
35
36 void sync();
37 QRhiCommandBuffer *queryCommandBuffer();
40
41 bool isValid() const
42 {
43 return m_rhi && m_sgTexture;
44 }
45
47 {
48 m_renderPending = true;
49 m_window->update(); // ensure getting to beforeRendering() at some point
50 }
51
52 bool hasRenderer() const
53 {
54 return m_renderer != nullptr;
55 }
56
57 void setRenderer(QQuickRhiItemRenderer *r)
58 {
59 m_renderer.reset(r);
60 }
61
62 QQuickRhiItem *m_item;
65 qreal m_dpr = 0.0f;
66 QRhi *m_rhi = nullptr;
67 bool m_renderPending = true;
70 QRhiTexture *m_colorTexture = nullptr;
71 QRhiTexture *m_resolveTexture = nullptr;
76
77public slots:
78 void render();
79};
80
99
100QT_END_NAMESPACE
101
102#endif
QRhiTexture * m_colorTexture
QQuickRhiItem * m_item
QRhiCommandBuffer * queryCommandBuffer()
std::unique_ptr< QRhiTextureRenderTarget > m_renderTarget
std::unique_ptr< QRhiRenderPassDescriptor > m_renderPassDescriptor
std::unique_ptr< QQuickRhiItemRenderer > m_renderer
QQuickWindow * m_window
std::unique_ptr< QRhiRenderBuffer > m_depthStencilBuffer
std::unique_ptr< QSGTexture > m_sgTexture
bool isValid() const
QSGTexture * texture() const override
Returns a pointer to the texture object.
void setRenderer(QQuickRhiItemRenderer *r)
std::unique_ptr< QRhiRenderBuffer > m_msaaColorBuffer
bool hasRenderer() const
QRhiTexture * m_resolveTexture
QRhiTexture::Format rhiTextureFormat
QQuickRhiItem::TextureFormat itemTextureFormat
\inmodule QtQuick
\inmodule QtGuiPrivate \inheaderfile rhi/qrhi.h
Definition qrhi.h:577
\inmodule QtGuiPrivate \inheaderfile rhi/qrhi.h
Definition qrhi.h:621
QGraphicsItem * item