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>.
|
#include <qsgadaptationlayer_p.h>
Classes | |
struct | GlyphData |
struct | GlyphPosition |
struct | Metrics |
struct | TexCoord |
struct | Texture |
Public Member Functions | |
QSGDistanceFieldGlyphCache (const QRawFont &font, int renderTypeQuality) | |
virtual | ~QSGDistanceFieldGlyphCache () |
const QRawFont & | referenceFont () 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 Texture * | glyphTexture (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 () |
virtual bool | eightBitFormatIsAlphaSwizzled () const =0 |
virtual bool | screenSpaceDerivativesSupported () const =0 |
virtual bool | isActive () const |
Protected Member Functions | |
virtual void | requestGlyphs (const QSet< glyph_t > &glyphs)=0 |
virtual void | storeGlyphs (const QList< QDistanceField > &glyphs)=0 |
virtual void | referenceGlyphs (const QSet< glyph_t > &glyphs)=0 |
virtual void | releaseGlyphs (const QSet< glyph_t > &glyphs)=0 |
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) |
GlyphData & | glyphData (glyph_t glyph) |
GlyphData & | emptyData (glyph_t glyph) |
int | baseFontSize () const |
Protected Attributes | |
bool | m_doubleGlyphResolution |
int | m_renderTypeQuality |
QRawFont | m_referenceFont |
Definition at line 406 of file qsgadaptationlayer_p.h.
QSGDistanceFieldGlyphCache::QSGDistanceFieldGlyphCache | ( | const QRawFont & | font, |
int | renderTypeQuality ) |
Definition at line 32 of file qsgadaptationlayer.cpp.
References font, QRawFontPrivate::get(), Q_ASSERT, QT_DISTANCEFIELD_HIGHGLYPHCOUNT(), QT_DISTANCEFIELD_SCALE(), qt_fontHasNarrowOutlines(), and QFont::setPixelSize().
|
virtual |
Definition at line 50 of file qsgadaptationlayer.cpp.
|
protected |
Definition at line 54 of file qsgadaptationlayer.cpp.
References m_doubleGlyphResolution, m_renderTypeQuality, and QT_DISTANCEFIELD_BASEFONTSIZE().
|
inlineprotected |
Definition at line 550 of file qsgadaptationlayer_p.h.
References glyphData(), QSGDistanceFieldGlyphCache::TexCoord::isValid(), and QSGDistanceFieldGlyphCache::GlyphData::texCoord.
|
inline |
Definition at line 451 of file qsgadaptationlayer_p.h.
References QT_DISTANCEFIELD_RADIUS(), and QT_DISTANCEFIELD_SCALE().
Referenced by QSGRhiDistanceFieldGlyphCache::requestGlyphs(), and QSGDistanceFieldGlyphNode::updateGeometry().
|
inline |
Definition at line 456 of file qsgadaptationlayer_p.h.
|
pure virtual |
Implemented in QSGRhiDistanceFieldGlyphCache.
Referenced by QSGDistanceFieldTextMaterial::createShader(), QSGDistanceFieldOutlineTextMaterial::createShader(), QSGDistanceFieldShiftedStyleTextMaterial::createShader(), QSGHiQSubPixelDistanceFieldTextMaterial::createShader(), and QSGLoQSubPixelDistanceFieldTextMaterial::createShader().
|
protected |
Definition at line 59 of file qsgadaptationlayer.cpp.
References it, and QSGDistanceFieldGlyphCache::GlyphData::texture.
Referenced by glyphData().
Definition at line 447 of file qsgadaptationlayer_p.h.
Referenced by glyphMetrics(), and QSGDistanceFieldGlyphNode::updateGeometry().
|
inline |
Definition at line 455 of file qsgadaptationlayer_p.h.
Referenced by QSGRhiDistanceFieldGlyphCache::createFullSizeTextures(), and populate().
|
protected |
Definition at line 67 of file qsgadaptationlayer.cpp.
References emptyData(), m_doubleGlyphResolution, m_referenceFont, QTransform::mapRect(), QRawFont::pathForGlyph(), QT_DISTANCEFIELD_SCALE(), and QTransform::scale().
Referenced by containsGlyph(), glyphMetrics(), glyphTexCoord(), glyphTexture(), populate(), release(), removeGlyph(), QSGRhiDistanceFieldGlyphCache::requestGlyphs(), setGlyphsPosition(), setGlyphsTexture(), and update().
QSGDistanceFieldGlyphCache::Metrics QSGDistanceFieldGlyphCache::glyphMetrics | ( | glyph_t | glyph, |
qreal | pixelSize ) |
Definition at line 83 of file qsgadaptationlayer.cpp.
References fontScale(), glyphData(), and QSGDistanceFieldGlyphCache::Metrics::width.
Referenced by QSGDistanceFieldGlyphNode::updateGeometry().
|
inline |
Definition at line 533 of file qsgadaptationlayer_p.h.
References glyphData(), and QSGDistanceFieldGlyphCache::GlyphData::texCoord.
Referenced by QSGRhiDistanceFieldGlyphCache::requestGlyphs(), QSGRhiDistanceFieldGlyphCache::storeGlyphs(), and QSGDistanceFieldGlyphNode::updateGeometry().
|
inline |
Definition at line 538 of file qsgadaptationlayer_p.h.
References glyphData(), and QSGDistanceFieldGlyphCache::GlyphData::texture.
Referenced by QSGDistanceFieldGlyphNode::updateGeometry(), and QSGDistanceFieldTextMaterial::updateTextureSize().
|
virtual |
Reimplemented in QSGRhiDistanceFieldGlyphCache.
Definition at line 144 of file qsgadaptationlayer.cpp.
Definition at line 270 of file qsgadaptationlayer.cpp.
References QDataBuffer< Type >::add(), and i.
Referenced by QSGRhiDistanceFieldGlyphCache::requestGlyphs().
Definition at line 97 of file qsgadaptationlayer.cpp.
References QSet< T >::contains(), glyphCount(), glyphData(), i, QSet< T >::insert(), qWarning, referenceGlyphs(), and requestGlyphs().
Referenced by QSGDistanceFieldGlyphNode::setGlyphs().
|
virtual |
Definition at line 236 of file qsgadaptationlayer.cpp.
|
inline |
Definition at line 445 of file qsgadaptationlayer_p.h.
|
protectedpure virtual |
Implemented in QSGRhiDistanceFieldGlyphCache.
Referenced by populate().
|
inline |
Definition at line 468 of file qsgadaptationlayer_p.h.
Referenced by QSGDistanceFieldGlyphNode::setGlyphs().
Definition at line 131 of file qsgadaptationlayer.cpp.
References glyphData(), i, and releaseGlyphs().
Referenced by QSGDistanceFieldGlyphNode::~QSGDistanceFieldGlyphNode().
|
protectedpure virtual |
Implemented in QSGRhiDistanceFieldGlyphCache.
Referenced by release().
Definition at line 543 of file qsgadaptationlayer_p.h.
References glyphData().
Referenced by QSGRhiDistanceFieldGlyphCache::requestGlyphs().
|
inline |
Definition at line 457 of file qsgadaptationlayer_p.h.
|
protectedpure virtual |
Implemented in QSGRhiDistanceFieldGlyphCache.
Referenced by populate().
|
pure virtual |
Implemented in QSGRhiDistanceFieldGlyphCache.
Referenced by QSGDistanceFieldTextMaterial::createShader(), QSGDistanceFieldOutlineTextMaterial::createShader(), QSGDistanceFieldShiftedStyleTextMaterial::createShader(), QSGHiQSubPixelDistanceFieldTextMaterial::createShader(), and QSGLoQSubPixelDistanceFieldTextMaterial::createShader().
|
protected |
Definition at line 209 of file qsgadaptationlayer.cpp.
References QIntrusiveList< N, member >::begin(), QIntrusiveList< N, member >::end(), QSGDistanceFieldGlyphCache::GlyphPosition::glyph, glyphData(), i, iter, m_doubleGlyphResolution, QSGDistanceFieldGlyphCache::GlyphPosition::position, QT_DISTANCEFIELD_RADIUS(), QT_DISTANCEFIELD_SCALE(), QPointF::x(), and QPointF::y().
Referenced by QSGRhiDistanceFieldGlyphCache::requestGlyphs().
|
protected |
Definition at line 241 of file qsgadaptationlayer.cpp.
References QIntrusiveList< N, member >::begin(), QIntrusiveList< N, member >::end(), glyphData(), i, iter, j, and QSGDistanceFieldGlyphCache::Texture::size.
Referenced by QSGRhiDistanceFieldGlyphCache::storeGlyphs().
|
protectedpure virtual |
Implemented in QSGRhiDistanceFieldGlyphCache.
Referenced by update().
|
inline |
Definition at line 469 of file qsgadaptationlayer_p.h.
Referenced by QSGDistanceFieldGlyphNode::~QSGDistanceFieldGlyphNode().
void QSGDistanceFieldGlyphCache::update | ( | ) |
Definition at line 149 of file qsgadaptationlayer.cpp.
References QDataBuffer< Type >::at(), QSet< T >::clear(), QRawFont::familyName(), glyphData(), i, QDataBuffer< Type >::isEmpty(), m_doubleGlyphResolution, m_referenceFont, now, Q_QUICK_SG_PROFILE_END_WITH_PAYLOAD, Q_QUICK_SG_PROFILE_RECORD, Q_QUICK_SG_PROFILE_START, Q_TRACE, Q_TRACE_SCOPE, qCDebug, qsg_render_timer, QDataBuffer< Type >::reset(), QDataBuffer< Type >::size(), and storeGlyphs().
|
protected |
Definition at line 277 of file qsgadaptationlayer.cpp.
References i, QSGDistanceFieldGlyphCache::Texture::size, and QSGDistanceFieldGlyphCache::Texture::texture.
|
protected |
Definition at line 516 of file qsgadaptationlayer_p.h.
Referenced by baseFontSize(), glyphData(), setGlyphsPosition(), and update().
|
protected |
Definition at line 520 of file qsgadaptationlayer_p.h.
Referenced by glyphData(), and update().
|
protected |
Definition at line 517 of file qsgadaptationlayer_p.h.
Referenced by baseFontSize().