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
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 ()
 
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 ()
 
void createCache (int width, int height)
 
void resizeCache (int width, int height)
 
bool isNull () 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 217 of file qsgrhitextureglyphcache.cpp.

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

+ Here is the call 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 225 of file qsgrhitextureglyphcache.cpp.

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

+ Here is the call graph for this function:

◆ endFillTexture()

void QSGRhiTextureGlyphCache::endFillTexture ( )
overridevirtual

◆ fillTexture()

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

Reimplemented from QImageTextureGlyphCache.

Definition at line 151 of file qsgrhitextureglyphcache.cpp.

References QVarLengthArray< T, Prealloc >::append(), QImage::copy(), QImageTextureGlyphCache::fillTexture(), QImageTextureGlyphCache::image(), QRhiTextureSubresourceUploadDescription::setDestinationTopLeft(), QRhiTextureSubresourceUploadDescription::setImage(), and QTextureGlyphCache::textureMapForGlyph().

+ Here is the call graph for this function:

◆ glyphPadding()

int QSGRhiTextureGlyphCache::glyphPadding ( ) const
overridevirtual

Reimplemented from QTextureGlyphCache.

Definition at line 196 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().

+ Here is the call graph for this function:

◆ maxTextureHeight()

int QSGRhiTextureGlyphCache::maxTextureHeight ( ) const
overridevirtual

Reimplemented from QTextureGlyphCache.

Definition at line 209 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 204 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.

◆ width()

int QSGRhiTextureGlyphCache::width ( ) const
inline

Definition at line 47 of file qsgrhitextureglyphcache_p.h.

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

+ Here is the call graph for this function:

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