Qt
Internal/Contributor docs for the Qt SDK. Note: These are NOT official API docs; those are found at https://doc.qt.io/
Toggle main menu visibility
Loading...
Searching...
No Matches
qsgrhitextureglyphcache_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
// Qt-Security score:significant reason:default
4
5
#
ifndef
QSGRHITEXTUREGLYPHCACHE_P_H
6
#
define
QSGRHITEXTUREGLYPHCACHE_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
<
QtGui
/
private
/
qtextureglyphcache_p
.
h
>
20
#
include
<
rhi
/
qrhi
.
h
>
21
22
QT_BEGIN_NAMESPACE
23
24
class
QSGDefaultRenderContext;
25
26
class
QSGRhiTextureGlyphCache
:
public
QImageTextureGlyphCache
27
{
28
public
:
29
QSGRhiTextureGlyphCache
(QSGDefaultRenderContext *rc,
30
QFontEngine::GlyphFormat format,
const
QTransform &matrix,
31
const
QColor &color = QColor());
32
~
QSGRhiTextureGlyphCache
();
33
34
void
createTextureData
(
int
width,
int
height)
override
;
35
void
resizeTextureData
(
int
width,
int
height)
override
;
36
void
beginFillTexture
()
override
;
37
void
fillTexture
(
const
Coord &c, glyph_t glyph,
const
QFixedPoint &subPixelPosition)
override
;
38
void
endFillTexture
()
override
;
39
int
glyphPadding
()
const
override
;
40
int
maxTextureWidth
()
const
override
;
41
int
maxTextureHeight
()
const
override
;
42
43
QRhiTexture *
texture
()
const
{
return
m_texture; }
44
void
commitResourceUpdates
(QRhiResourceUpdateBatch *mergeInto);
45
46
// Clamp the default -1 width and height to 0 for compatibility with
47
// QOpenGLTextureGlyphCache.
48
int
width
()
const
{
return
qMax(0, m_size.width()); }
49
int
height
()
const
{
return
qMax(0, m_size.height()); }
50
51
bool
eightBitFormatIsAlphaSwizzled
()
const
;
52
53
private
:
54
void
prepareGlyphImage(QImage *img);
55
QRhiTexture *createEmptyTexture(QRhiTexture::Format format);
56
57
QSGDefaultRenderContext *m_rc;
58
QRhi *m_rhi;
59
bool
m_resizeWithTextureCopy;
60
QRhiTexture *m_texture =
nullptr
;
61
QSize m_size;
62
bool
m_bgra =
false
;
63
QVarLengthArray<QRhiTextureUploadEntry, 16> m_uploads;
64
};
65
66
QT_END_NAMESPACE
67
68
#
endif
// QSGRHITEXTUREGLYPHCACHE_P_H
QRhiTextureSubresourceUploadDescription
\inmodule QtGuiPrivate \inheaderfile rhi/qrhi.h
Definition
qrhi.h:694
QRhiTextureUploadDescription
\inmodule QtGuiPrivate \inheaderfile rhi/qrhi.h
Definition
qrhi.h:754
QSGDefaultRenderContext
\inmodule QtQuick
Definition
qsgdefaultrendercontext_p.h:49
QSGRhiTextureGlyphCache
Definition
qsgrhitextureglyphcache_p.h:27
QSGRhiTextureGlyphCache::~QSGRhiTextureGlyphCache
~QSGRhiTextureGlyphCache()
Definition
qsgrhitextureglyphcache.cpp:25
QSGRhiTextureGlyphCache::resizeTextureData
void resizeTextureData(int width, int height) override
Definition
qsgrhitextureglyphcache.cpp:65
QSGRhiTextureGlyphCache::commitResourceUpdates
void commitResourceUpdates(QRhiResourceUpdateBatch *mergeInto)
Definition
qsgrhitextureglyphcache.cpp:218
QSGRhiTextureGlyphCache::endFillTexture
void endFillTexture() override
Definition
qsgrhitextureglyphcache.cpp:173
QSGRhiTextureGlyphCache::width
int width() const
Definition
qsgrhitextureglyphcache_p.h:48
QSGRhiTextureGlyphCache::texture
QRhiTexture * texture() const
Definition
qsgrhitextureglyphcache_p.h:43
QSGRhiTextureGlyphCache::beginFillTexture
void beginFillTexture() override
Definition
qsgrhitextureglyphcache.cpp:98
QSGRhiTextureGlyphCache::glyphPadding
int glyphPadding() const override
Definition
qsgrhitextureglyphcache.cpp:197
QSGRhiTextureGlyphCache::maxTextureHeight
int maxTextureHeight() const override
Definition
qsgrhitextureglyphcache.cpp:210
QSGRhiTextureGlyphCache::QSGRhiTextureGlyphCache
QSGRhiTextureGlyphCache(QSGDefaultRenderContext *rc, QFontEngine::GlyphFormat format, const QTransform &matrix, const QColor &color=QColor())
Definition
qsgrhitextureglyphcache.cpp:12
QSGRhiTextureGlyphCache::eightBitFormatIsAlphaSwizzled
bool eightBitFormatIsAlphaSwizzled() const
Definition
qsgrhitextureglyphcache.cpp:226
QSGRhiTextureGlyphCache::maxTextureWidth
int maxTextureWidth() const override
Definition
qsgrhitextureglyphcache.cpp:205
QSGRhiTextureGlyphCache::height
int height() const
Definition
qsgrhitextureglyphcache_p.h:49
QSGRhiTextureGlyphCache::fillTexture
void fillTexture(const Coord &c, glyph_t glyph, const QFixedPoint &subPixelPosition) override
Definition
qsgrhitextureglyphcache.cpp:152
QSGRhiTextureGlyphCache::createTextureData
void createTextureData(int width, int height) override
Definition
qsgrhitextureglyphcache.cpp:54
QT_BEGIN_NAMESPACE
Combined button and popup list for selecting options.
Definition
qsequentialanimationgroup.cpp:47
std
[33]
Definition
src_corelib_tools_qhash.cpp:421
QRgb
QT_BEGIN_NAMESPACE typedef unsigned int QRgb
Definition
qrgb.h:14
qRed
constexpr int qRed(QRgb rgb)
Definition
qrgb.h:19
qGreen
constexpr int qGreen(QRgb rgb)
Definition
qrgb.h:22
qRgba
constexpr QRgb qRgba(int r, int g, int b, int a)
Definition
qrgb.h:34
qBlue
constexpr int qBlue(QRgb rgb)
Definition
qrgb.h:25
qtdeclarative
src
quick
scenegraph
qsgrhitextureglyphcache_p.h
Generated on
for Qt by
1.18.0