Qt 6.x
The Qt SDK
Loading...
Searching...
No Matches
QSGRhiTextureGlyphCache Class Reference

#include <qsgrhitextureglyphcache_p.h>

+ Inheritance diagram for QSGRhiTextureGlyphCache:
+ Collaboration diagram for QSGRhiTextureGlyphCache:

Public Member Functions

 QSGRhiTextureGlyphCache (QSGDefaultRenderContext *rc, QFontEngine::GlyphFormat format, const QTransform &matrix, const QColor &color=QColor())
 
 ~QSGRhiTextureGlyphCache ()
 
void createTextureData (int width, int height) override
 
void resizeTextureData (int width, int height) override
 
void beginFillTexture () override
 
void fillTexture (const Coord &c, glyph_t glyph, const QFixedPoint &subPixelPosition) override
 
void endFillTexture () override
 
int glyphPadding () const override
 
int maxTextureWidth () const override
 
int maxTextureHeight () const override
 
QRhiTexturetexture () const
 
void commitResourceUpdates (QRhiResourceUpdateBatch *mergeInto)
 
int width () const
 
int height () const
 
bool eightBitFormatIsAlphaSwizzled () const
 
- Public Member Functions inherited from QImageTextureGlyphCache
 QImageTextureGlyphCache (QFontEngine::GlyphFormat format, const QTransform &matrix, const QColor &color=QColor())
 
 ~QImageTextureGlyphCache ()
 
virtual void createTextureData (int width, int height) override
 
virtual void resizeTextureData (int width, int height) override
 
virtual void fillTexture (const Coord &c, glyph_t glyph, const QFixedPoint &subPixelPosition) override
 
const QImageimage () const
 
- Public Member Functions inherited from QTextureGlyphCache
 QTextureGlyphCache (QFontEngine::GlyphFormat format, const QTransform &matrix, const QColor &color=QColor())
 
 ~QTextureGlyphCache ()
 
bool populate (QFontEngine *fontEngine, qsizetype numGlyphs, const glyph_t *glyphs, const QFixedPoint *positions, QPainter::RenderHints renderHints=QPainter::RenderHints(), bool includeGlyphCacheScale=false)
 
bool hasPendingGlyphs () const
 
void fillInPendingGlyphs ()
 
virtual void createTextureData (int width, int height)=0
 
virtual void resizeTextureData (int width, int height)=0
 
virtual int glyphPadding () const
 
virtual void beginFillTexture ()
 
virtual void fillTexture (const Coord &coord, glyph_t glyph, const QFixedPoint &subPixelPosition)=0
 
virtual void endFillTexture ()
 
void createCache (int width, int height)
 
void resizeCache (int width, int height)
 
bool isNull () const
 
virtual int maxTextureWidth () const
 
virtual int maxTextureHeight () const
 
QImage textureMapForGlyph (glyph_t g, const QFixedPoint &subPixelPosition) const
 
- Public Member Functions inherited from QFontEngineGlyphCache
 QFontEngineGlyphCache (QFontEngine::GlyphFormat format, const QTransform &matrix, const QColor &color=QColor())
 
virtual ~QFontEngineGlyphCache ()
 
QFontEngine::GlyphFormat glyphFormat () const
 
const QTransformtransform () const
 
const QColorcolor () const
 
- Public Member Functions inherited from QSharedData
 QSharedData () noexcept
 Constructs a QSharedData object with a reference count of 0.
 
 QSharedData (const QSharedData &) noexcept
 Constructs a QSharedData object with reference count 0.
 
QSharedDataoperator= (const QSharedData &)=delete
 
 ~QSharedData ()=default
 

Additional Inherited Members

- Public Attributes inherited from QTextureGlyphCache
QHash< GlyphAndSubPixelPosition, Coordcoords
 
- Public Attributes inherited from QFontEngineGlyphCache
QFontEngine::GlyphFormat m_format
 
QTransform m_transform
 
QColor m_color
 
- Public Attributes inherited from QSharedData
QAtomicInt ref
 
- Protected Member Functions inherited from QTextureGlyphCache
int calculateSubPixelPositionCount (glyph_t) const
 
- Protected Attributes inherited from QTextureGlyphCache
QFontEnginem_current_fontengine
 
QHash< GlyphAndSubPixelPosition, Coordm_pendingGlyphs
 
int m_w
 
int m_h
 
int m_cx
 
int m_cy
 
int m_currentRowHeight
 

Detailed Description

Definition at line 25 of file qsgrhitextureglyphcache_p.h.

Constructor & Destructor Documentation

◆ QSGRhiTextureGlyphCache()

QT_BEGIN_NAMESPACE QSGRhiTextureGlyphCache::QSGRhiTextureGlyphCache ( QSGDefaultRenderContext rc,
QFontEngine::GlyphFormat  format,
const QTransform matrix,
const QColor color = QColor() 
)

Definition at line 11 of file qsgrhitextureglyphcache.cpp.

References QRhi::backend(), and QRhi::OpenGLES2.

+ Here is the call graph for this function:

◆ ~QSGRhiTextureGlyphCache()

QSGRhiTextureGlyphCache::~QSGRhiTextureGlyphCache ( )

Definition at line 24 of file qsgrhitextureglyphcache.cpp.

References QSGDefaultRenderContext::deferredReleaseGlyphCacheTexture().

+ Here is the call graph for this function:

Member Function Documentation

◆ beginFillTexture()

void QSGRhiTextureGlyphCache::beginFillTexture ( )
overridevirtual

Reimplemented from QTextureGlyphCache.

Definition at line 97 of file qsgrhitextureglyphcache.cpp.

References QVarLengthArray< T, Prealloc >::isEmpty(), and Q_ASSERT.

+ Here is the call graph for this function:

◆ commitResourceUpdates()

void QSGRhiTextureGlyphCache::commitResourceUpdates ( QRhiResourceUpdateBatch mergeInto)

Definition at line 211 of file qsgrhitextureglyphcache.cpp.

References QSGDefaultRenderContext::maybeGlyphCacheResourceUpdates(), QRhiResourceUpdateBatch::merge(), and QSGDefaultRenderContext::resetGlyphCacheResources().

Referenced by QSGTextMaskRhiShader::updateUniformData().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ createTextureData()

void QSGRhiTextureGlyphCache::createTextureData ( int  width,
int  height 
)
overridevirtual

Reimplemented from QImageTextureGlyphCache.

Definition at line 53 of file qsgrhitextureglyphcache.cpp.

References QImageTextureGlyphCache::createTextureData(), and qMax().

+ Here is the call graph for this function:

◆ eightBitFormatIsAlphaSwizzled()

bool QSGRhiTextureGlyphCache::eightBitFormatIsAlphaSwizzled ( ) const

Definition at line 219 of file qsgrhitextureglyphcache.cpp.

References QRhi::isFeatureSupported(), and QRhi::RedOrAlpha8IsRed.

Referenced by QSGTextMaskMaterial::createShader(), QSGStyledTextMaterial::createShader(), and QSGOutlinedTextMaterial::createShader().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ endFillTexture()

◆ fillTexture()

void QSGRhiTextureGlyphCache::fillTexture ( const Coord c,
glyph_t  glyph,
const QFixedPoint subPixelPosition 
)
overridevirtual

◆ glyphPadding()

int QSGRhiTextureGlyphCache::glyphPadding ( ) const
overridevirtual

Reimplemented from QTextureGlyphCache.

Definition at line 190 of file qsgrhitextureglyphcache.cpp.

References QFontEngine::Format_Mono, and QFontEngineGlyphCache::m_format.

◆ height()

int QSGRhiTextureGlyphCache::height ( ) const
inline

Definition at line 48 of file qsgrhitextureglyphcache_p.h.

References QSize::height(), and qMax().

Referenced by QSGTextMaskMaterial::ensureUpToDate(), and QSGTextMaskRhiShader::updateUniformData().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ maxTextureHeight()

int QSGRhiTextureGlyphCache::maxTextureHeight ( ) const
overridevirtual

Reimplemented from QTextureGlyphCache.

Definition at line 203 of file qsgrhitextureglyphcache.cpp.

References qMin(), QRhi::resourceLimit(), and QRhi::TextureSizeMax.

+ Here is the call graph for this function:

◆ maxTextureWidth()

int QSGRhiTextureGlyphCache::maxTextureWidth ( ) const
overridevirtual

Reimplemented from QTextureGlyphCache.

Definition at line 198 of file qsgrhitextureglyphcache.cpp.

References QRhi::resourceLimit(), and QRhi::TextureSizeMax.

+ Here is the call graph for this function:

◆ resizeTextureData()

void QSGRhiTextureGlyphCache::resizeTextureData ( int  width,
int  height 
)
overridevirtual

◆ texture()

QRhiTexture * QSGRhiTextureGlyphCache::texture ( ) const
inline

Definition at line 42 of file qsgrhitextureglyphcache_p.h.

Referenced by QSGTextMaskMaterial::ensureUpToDate().

+ Here is the caller graph for this function:

◆ width()

int QSGRhiTextureGlyphCache::width ( ) const
inline

Definition at line 47 of file qsgrhitextureglyphcache_p.h.

References qMax(), and QSize::width().

Referenced by QSGTextMaskMaterial::ensureUpToDate(), and QSGTextMaskRhiShader::updateUniformData().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

The documentation for this class was generated from the following files: