Qt
Internal/Contributor docs for the Qt SDK. <b>Note:</b> These are NOT official API docs; those are found <a href='https://doc.qt.io/'>here</a>.
Loading...
Searching...
No Matches
qsgrhilayer_p.h
Go to the documentation of this file.
1
// Copyright (C) 2019 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
#ifndef QSGRHILAYER_P_H
4
#define QSGRHILAYER_P_H
5
6
//
7
// W A R N I N G
8
// -------------
9
//
10
// This file is not part of the Qt API. It exists purely as an
11
// implementation detail. This header file may change from version to
12
// version without notice, or even be removed.
13
//
14
// We mean it.
15
//
16
17
#include <private/qsgadaptationlayer_p.h>
18
#include <private/qsgcontext_p.h>
19
#include <private/qsgtexture_p.h>
20
#include <
rhi/qrhi.h
>
21
22
QT_BEGIN_NAMESPACE
23
24
class
QSGDefaultRenderContext
;
25
26
class
Q_QUICK_EXPORT
QSGRhiLayer
:
public
QSGLayer
27
{
28
Q_OBJECT
29
30
public
:
31
QSGRhiLayer
(
QSGRenderContext
*
context
);
32
~QSGRhiLayer
();
33
34
bool
updateTexture()
override
;
35
36
bool
hasAlphaChannel()
const override
;
37
bool
hasMipmaps()
const override
;
38
QSize
textureSize
()
const override
{
return
m_pixelSize; }
39
40
qint64
comparisonKey()
const override
;
41
QRhiTexture
*rhiTexture()
const override
;
42
void
commitTextureOperations(
QRhi
*rhi,
QRhiResourceUpdateBatch
*resourceUpdates)
override
;
43
44
void
setItem(
QSGNode
*
item
)
override
;
45
void
setRect(
const
QRectF
&logicalRect)
override
;
46
void
setSize(
const
QSize
&pixelSize)
override
;
47
void
setHasMipmaps(
bool
mipmap)
override
;
48
void
setFormat
(
Format
format
)
override
;
49
void
setLive(
bool
live)
override
;
50
void
setRecursive(
bool
recursive)
override
;
51
void
setDevicePixelRatio
(
qreal
ratio)
override
{ m_dpr = ratio; }
52
void
setMirrorHorizontal(
bool
mirror)
override
;
53
void
setMirrorVertical(
bool
mirror)
override
;
54
QRectF
normalizedTextureSubRect()
const override
;
55
void
setSamples
(
int
samples
)
override
{ m_samples =
samples
; }
56
57
void
scheduleUpdate()
override
;
58
QImage
toImage()
const override
;
59
60
public
Q_SLOTS
:
61
void
markDirtyTexture()
override
;
62
void
invalidated()
override
;
63
64
private
:
65
void
grab();
66
void
releaseResources();
67
68
QSGNode
*m_item =
nullptr
;
69
QRectF
m_logicalRect;
70
QSize
m_pixelSize;
71
qreal
m_dpr = 1;
72
QRhiTexture::Format
m_format =
QRhiTexture::RGBA8
;
73
74
QSGRenderer
*m_renderer =
nullptr
;
75
QRhiTexture
*m_texture =
nullptr
;
76
QRhiRenderBuffer
*m_ds =
nullptr
;
77
QRhiRenderBuffer
*m_msaaColorBuffer =
nullptr
;
78
QRhiTexture
*m_secondaryTexture =
nullptr
;
79
QRhiTextureRenderTarget
*m_rt =
nullptr
;
80
QRhiRenderPassDescriptor
*m_rtRp =
nullptr
;
81
82
QSGDefaultRenderContext
*m_context =
nullptr
;
83
QRhi
*m_rhi =
nullptr
;
84
int
m_samples = 0;
85
86
uint
m_mipmap : 1;
87
uint
m_live : 1;
88
uint
m_recursive : 1;
89
uint
m_dirtyTexture : 1;
90
uint
m_multisampling : 1;
91
uint
m_grab : 1;
92
uint
m_mirrorHorizontal : 1;
93
uint
m_mirrorVertical : 1;
94
};
95
96
QT_END_NAMESPACE
97
98
#endif
// QSGRHILAYER_P_H
QImage
\inmodule QtGui
Definition
qimage.h:37
QRectF
\inmodule QtCore\reentrant
Definition
qrect.h:484
QRhiRenderBuffer
\inmodule QtGui
Definition
qrhi.h:1094
QRhiRenderPassDescriptor
\inmodule QtGui
Definition
qrhi.h:1142
QRhiResourceUpdateBatch
\inmodule QtGui
Definition
qrhi.h:1731
QRhiTextureRenderTarget
\inmodule QtGui
Definition
qrhi.h:1184
QRhiTexture
\inmodule QtGui
Definition
qrhi.h:895
QRhiTexture::Format
Format
Specifies the texture format.
Definition
qrhi.h:914
QRhiTexture::RGBA8
@ RGBA8
Definition
qrhi.h:917
QRhi
\inmodule QtGuiPrivate \inheaderfile rhi/qrhi.h
Definition
qrhi.h:1804
QSGDefaultRenderContext
Definition
qsgdefaultrendercontext_p.h:36
QSGLayer
Definition
qsgadaptationlayer_p.h:176
QSGNode
\group qtquick-scenegraph-nodes \title Qt Quick Scene Graph Node classes
Definition
qsgnode.h:37
QSGRenderContext
Definition
qsgcontext_p.h:134
QSGRenderer
The renderer class is the abstract baseclass used for rendering the QML scene graph.
Definition
qsgrenderer_p.h:61
QSGRhiLayer
Definition
qsgrhilayer_p.h:27
QSGRhiLayer::setDevicePixelRatio
void setDevicePixelRatio(qreal ratio) override
Definition
qsgrhilayer_p.h:51
QSGRhiLayer::textureSize
QSize textureSize() const override
Returns the size of the texture in pixels.
Definition
qsgrhilayer_p.h:38
QSGRhiLayer::setSamples
void setSamples(int samples) override
Definition
qsgrhilayer_p.h:55
QSize
\inmodule QtCore
Definition
qsize.h:25
Format
Format
Definition
ddsheader.h:14
setFormat
widget setFormat(format)
QT_BEGIN_NAMESPACE
Combined button and popup list for selecting options.
Definition
qstandardpaths_haiku.cpp:21
QT_END_NAMESPACE
Definition
qsharedpointer.cpp:1590
context
static void * context
Definition
qandroidaudiosource.cpp:42
samples
GLsizei samples
Definition
qopengles2ext.h:738
format
GLint GLsizei GLsizei GLenum format
Definition
qopengles2ext.h:206
qrhi.h
Q_OBJECT
#define Q_OBJECT
Definition
qtmetamacros.h:119
Q_SLOTS
#define Q_SLOTS
Definition
qtmetamacros.h:44
uint
unsigned int uint
Definition
qtypes.h:34
qint64
long long qint64
Definition
qtypes.h:60
qreal
double qreal
Definition
qtypes.h:187
item
QGraphicsItem * item
Definition
src_gui_graphicsview_qgraphicsitem.cpp:107
qtdeclarative
src
quick
scenegraph
qsgrhilayer_p.h
Generated by
1.10.0