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
QSGRhiDistanceFieldGlyphCache Class Reference

#include <qsgrhidistancefieldglyphcache_p.h>

+ Inheritance diagram for QSGRhiDistanceFieldGlyphCache:
+ Collaboration diagram for QSGRhiDistanceFieldGlyphCache:

Public Member Functions

 QSGRhiDistanceFieldGlyphCache (QSGDefaultRenderContext *rc, const QRawFont &font, int renderTypeQuality)
 
virtual ~QSGRhiDistanceFieldGlyphCache ()
 
void requestGlyphs (const QSet< glyph_t > &glyphs) override
 
void storeGlyphs (const QList< QDistanceField > &glyphs) override
 
void referenceGlyphs (const QSet< glyph_t > &glyphs) override
 
void releaseGlyphs (const QSet< glyph_t > &glyphs) override
 
bool useTextureResizeWorkaround () const
 
bool createFullSizeTextures () const
 
bool isActive () const override
 
int maxTextureSize () const
 
void setMaxTextureCount (int max)
 
int maxTextureCount () const
 
void commitResourceUpdates (QRhiResourceUpdateBatch *mergeInto)
 
bool eightBitFormatIsAlphaSwizzled () const override
 
bool screenSpaceDerivativesSupported () const override
 
- Public Member Functions inherited from QSGDistanceFieldGlyphCache
 QSGDistanceFieldGlyphCache (const QRawFont &font, int renderTypeQuality)
 
virtual ~QSGDistanceFieldGlyphCache ()
 
const QRawFontreferenceFont () const
 
qreal fontScale (qreal pixelSize) const
 
qreal distanceFieldRadius () const
 
int glyphCount () const
 
bool doubleGlyphResolution () const
 
int renderTypeQuality () const
 
Metrics glyphMetrics (glyph_t glyph, qreal pixelSize)
 
TexCoord glyphTexCoord (glyph_t glyph)
 
const TextureglyphTexture (glyph_t glyph)
 
void populate (const QVector< glyph_t > &glyphs)
 
void release (const QVector< glyph_t > &glyphs)
 
void update ()
 
void registerGlyphNode (QSGDistanceFieldGlyphConsumer *node)
 
void unregisterGlyphNode (QSGDistanceFieldGlyphConsumer *node)
 
virtual void processPendingGlyphs ()
 

Additional Inherited Members

- Protected Member Functions inherited from QSGDistanceFieldGlyphCache
void setGlyphsPosition (const QList< GlyphPosition > &glyphs)
 
void setGlyphsTexture (const QVector< glyph_t > &glyphs, const Texture &tex)
 
void markGlyphsToRender (const QVector< glyph_t > &glyphs)
 
void removeGlyph (glyph_t glyph)
 
void updateRhiTexture (QRhiTexture *oldTex, QRhiTexture *newTex, const QSize &newTexSize)
 
bool containsGlyph (glyph_t glyph)
 
GlyphDataglyphData (glyph_t glyph)
 
GlyphDataemptyData (glyph_t glyph)
 
int baseFontSize () const
 
- Protected Attributes inherited from QSGDistanceFieldGlyphCache
bool m_doubleGlyphResolution
 
int m_renderTypeQuality
 
QRawFont m_referenceFont
 

Detailed Description

Definition at line 26 of file qsgrhidistancefieldglyphcache_p.h.

Constructor & Destructor Documentation

◆ QSGRhiDistanceFieldGlyphCache()

QSGRhiDistanceFieldGlyphCache::QSGRhiDistanceFieldGlyphCache ( QSGDefaultRenderContext * rc,
const QRawFont & font,
int renderTypeQuality )

Definition at line 22 of file qsgrhidistancefieldglyphcache.cpp.

References font.

◆ ~QSGRhiDistanceFieldGlyphCache()

QSGRhiDistanceFieldGlyphCache::~QSGRhiDistanceFieldGlyphCache ( )
virtual

Definition at line 33 of file qsgrhidistancefieldglyphcache.cpp.

References QSGDefaultRenderContext::deferredReleaseGlyphCacheTexture().

+ Here is the call graph for this function:

Member Function Documentation

◆ commitResourceUpdates()

void QSGRhiDistanceFieldGlyphCache::commitResourceUpdates ( QRhiResourceUpdateBatch * mergeInto)

Definition at line 512 of file qsgrhidistancefieldglyphcache.cpp.

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

+ Here is the call graph for this function:

◆ createFullSizeTextures()

bool QSGRhiDistanceFieldGlyphCache::createFullSizeTextures ( ) const

Definition at line 251 of file qsgrhidistancefieldglyphcache.cpp.

References QSGDistanceFieldGlyphCache::glyphCount(), and QT_DISTANCEFIELD_HIGHGLYPHCOUNT().

+ Here is the call graph for this function:

◆ eightBitFormatIsAlphaSwizzled()

bool QSGRhiDistanceFieldGlyphCache::eightBitFormatIsAlphaSwizzled ( ) const
overridevirtual

Implements QSGDistanceFieldGlyphCache.

Definition at line 520 of file qsgrhidistancefieldglyphcache.cpp.

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

+ Here is the call graph for this function:

◆ isActive()

bool QSGRhiDistanceFieldGlyphCache::isActive ( ) const
overridevirtual

Reimplemented from QSGDistanceFieldGlyphCache.

Definition at line 105 of file qsgrhidistancefieldglyphcache.cpp.

References QSet< T >::empty().

+ Here is the call graph for this function:

◆ maxTextureCount()

int QSGRhiDistanceFieldGlyphCache::maxTextureCount ( ) const
inline

Definition at line 43 of file qsgrhidistancefieldglyphcache_p.h.

◆ maxTextureSize()

int QSGRhiDistanceFieldGlyphCache::maxTextureSize ( ) const

Definition at line 256 of file qsgrhidistancefieldglyphcache.cpp.

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

Referenced by requestGlyphs().

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

◆ referenceGlyphs()

void QSGRhiDistanceFieldGlyphCache::referenceGlyphs ( const QSet< glyph_t > & glyphs)
overridevirtual

Implements QSGDistanceFieldGlyphCache.

Definition at line 168 of file qsgrhidistancefieldglyphcache.cpp.

◆ releaseGlyphs()

void QSGRhiDistanceFieldGlyphCache::releaseGlyphs ( const QSet< glyph_t > & glyphs)
overridevirtual

Implements QSGDistanceFieldGlyphCache.

Definition at line 174 of file qsgrhidistancefieldglyphcache.cpp.

◆ requestGlyphs()

◆ screenSpaceDerivativesSupported()

bool QSGRhiDistanceFieldGlyphCache::screenSpaceDerivativesSupported ( ) const
overridevirtual

Implements QSGDistanceFieldGlyphCache.

Definition at line 527 of file qsgrhidistancefieldglyphcache.cpp.

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

+ Here is the call graph for this function:

◆ setMaxTextureCount()

void QSGRhiDistanceFieldGlyphCache::setMaxTextureCount ( int max)
inline

Definition at line 42 of file qsgrhidistancefieldglyphcache_p.h.

◆ storeGlyphs()

◆ useTextureResizeWorkaround()

bool QSGRhiDistanceFieldGlyphCache::useTextureResizeWorkaround ( ) const

Definition at line 240 of file qsgrhidistancefieldglyphcache.cpp.

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

Referenced by storeGlyphs().

+ 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: