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
QTextureGlyphCache Class Referenceabstract

#include <qtextureglyphcache_p.h>

+ Inheritance diagram for QTextureGlyphCache:
+ Collaboration diagram for QTextureGlyphCache:

Classes

struct  Coord
 
struct  GlyphAndSubPixelPosition
 

Public Member Functions

 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
 

Public Attributes

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

int calculateSubPixelPositionCount (glyph_t) const
 

Protected Attributes

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 38 of file qtextureglyphcache_p.h.

Constructor & Destructor Documentation

◆ QTextureGlyphCache()

QTextureGlyphCache::QTextureGlyphCache ( QFontEngine::GlyphFormat format,
const QTransform & matrix,
const QColor & color = QColor() )
inline

Definition at line 41 of file qtextureglyphcache_p.h.

◆ ~QTextureGlyphCache()

QT_BEGIN_NAMESPACE QTextureGlyphCache::~QTextureGlyphCache ( )

Definition at line 17 of file qtextureglyphcache.cpp.

Member Function Documentation

◆ beginFillTexture()

virtual void QTextureGlyphCache::beginFillTexture ( )
inlinevirtual

Reimplemented in QSGRhiTextureGlyphCache.

Definition at line 90 of file qtextureglyphcache_p.h.

Referenced by fillInPendingGlyphs().

+ Here is the caller graph for this function:

◆ calculateSubPixelPositionCount()

int QTextureGlyphCache::calculateSubPixelPositionCount ( glyph_t glyph) const
protected

Definition at line 21 of file qtextureglyphcache.cpp.

References QFontEngine::addGlyphsToPath(), QFixed::fromReal(), i, images, j, m_current_fontengine, and textureMapForGlyph().

Referenced by populate().

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

◆ createCache()

void QTextureGlyphCache::createCache ( int width,
int height )
inline

Definition at line 96 of file qtextureglyphcache_p.h.

Referenced by fillInPendingGlyphs().

+ Here is the caller graph for this function:

◆ createTextureData()

virtual void QTextureGlyphCache::createTextureData ( int width,
int height )
pure virtual

◆ endFillTexture()

virtual void QTextureGlyphCache::endFillTexture ( )
inlinevirtual

Reimplemented in QSGRhiTextureGlyphCache.

Definition at line 94 of file qtextureglyphcache_p.h.

Referenced by fillInPendingGlyphs().

+ Here is the caller graph for this function:

◆ fillInPendingGlyphs()

void QTextureGlyphCache::fillInPendingGlyphs ( )

Definition at line 206 of file qtextureglyphcache.cpp.

References beginFillTexture(), createCache(), endFillTexture(), fillTexture(), hasPendingGlyphs(), isNull(), iter, m_h, m_pendingGlyphs, m_w, qMax(), qNextPowerOfTwo(), and resizeCache().

+ Here is the call graph for this function:

◆ fillTexture()

virtual void QTextureGlyphCache::fillTexture ( const Coord & coord,
glyph_t glyph,
const QFixedPoint & subPixelPosition )
pure virtual

Implemented in QImageTextureGlyphCache, QOpenGLTextureGlyphCache, and QSGRhiTextureGlyphCache.

Referenced by fillInPendingGlyphs().

+ Here is the caller graph for this function:

◆ glyphPadding()

virtual int QTextureGlyphCache::glyphPadding ( ) const
inlinevirtual

Reimplemented in QOpenGLTextureGlyphCache, and QSGRhiTextureGlyphCache.

Definition at line 88 of file qtextureglyphcache_p.h.

Referenced by populate().

+ Here is the caller graph for this function:

◆ hasPendingGlyphs()

bool QTextureGlyphCache::hasPendingGlyphs ( ) const
inline

Definition at line 83 of file qtextureglyphcache_p.h.

Referenced by fillInPendingGlyphs().

+ Here is the caller graph for this function:

◆ isNull()

bool QTextureGlyphCache::isNull ( ) const
inline

Definition at line 109 of file qtextureglyphcache_p.h.

Referenced by QOpenGLTextureGlyphCache::createTextureData(), and fillInPendingGlyphs().

+ Here is the caller graph for this function:

◆ maxTextureHeight()

virtual int QTextureGlyphCache::maxTextureHeight ( ) const
inlinevirtual

Reimplemented in QOpenGLTextureGlyphCache, and QSGRhiTextureGlyphCache.

Definition at line 113 of file qtextureglyphcache_p.h.

Referenced by QOpenGLTextureGlyphCache::maxTextureHeight(), and populate().

+ Here is the caller graph for this function:

◆ maxTextureWidth()

virtual int QTextureGlyphCache::maxTextureWidth ( ) const
inlinevirtual

Reimplemented in QOpenGLTextureGlyphCache, and QSGRhiTextureGlyphCache.

Definition at line 112 of file qtextureglyphcache_p.h.

References QT_DEFAULT_TEXTURE_GLYPH_CACHE_WIDTH.

Referenced by QOpenGLTextureGlyphCache::maxTextureWidth(), and populate().

+ Here is the caller graph for this function:

◆ populate()

◆ resizeCache()

void QTextureGlyphCache::resizeCache ( int width,
int height )
inline

Definition at line 102 of file qtextureglyphcache_p.h.

Referenced by fillInPendingGlyphs().

+ Here is the caller graph for this function:

◆ resizeTextureData()

virtual void QTextureGlyphCache::resizeTextureData ( int width,
int height )
pure virtual

◆ textureMapForGlyph()

QImage QTextureGlyphCache::textureMapForGlyph ( glyph_t g,
const QFixedPoint & subPixelPosition ) const

Definition at line 245 of file qtextureglyphcache.cpp.

References QFontEngine::alphaMapForGlyph(), QFontEngine::alphaRGBMapForGlyph(), QFontEngine::bitmapForGlyph(), QFontEngineGlyphCache::color(), QFontEngine::Format_A32, QFontEngine::Format_ARGB, m_current_fontengine, QFontEngineGlyphCache::m_format, and QFontEngineGlyphCache::m_transform.

Referenced by calculateSubPixelPositionCount(), QImageTextureGlyphCache::fillTexture(), QOpenGLTextureGlyphCache::fillTexture(), and QSGRhiTextureGlyphCache::fillTexture().

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

Member Data Documentation

◆ coords

QHash<GlyphAndSubPixelPosition, Coord> QTextureGlyphCache::coords

Definition at line 111 of file qtextureglyphcache_p.h.

◆ m_current_fontengine

QFontEngine* QTextureGlyphCache::m_current_fontengine
protected

◆ m_currentRowHeight

int QTextureGlyphCache::m_currentRowHeight
protected

Definition at line 127 of file qtextureglyphcache_p.h.

Referenced by QOpenGLTextureGlyphCache::clear(), and populate().

◆ m_cx

int QTextureGlyphCache::m_cx
protected

Definition at line 125 of file qtextureglyphcache_p.h.

Referenced by QOpenGLTextureGlyphCache::clear(), and populate().

◆ m_cy

int QTextureGlyphCache::m_cy
protected

Definition at line 126 of file qtextureglyphcache_p.h.

Referenced by QOpenGLTextureGlyphCache::clear(), and populate().

◆ m_h

int QTextureGlyphCache::m_h
protected

Definition at line 124 of file qtextureglyphcache_p.h.

Referenced by QOpenGLTextureGlyphCache::clear(), and fillInPendingGlyphs().

◆ m_pendingGlyphs

QHash<GlyphAndSubPixelPosition, Coord> QTextureGlyphCache::m_pendingGlyphs
protected

Definition at line 121 of file qtextureglyphcache_p.h.

Referenced by fillInPendingGlyphs(), and populate().

◆ m_w

int QTextureGlyphCache::m_w
protected

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