![]() |
Qt 6.x
The Qt SDK
|
#include <qsgadaptationlayer_p.h>
Classes | |
struct | GlyphData |
struct | GlyphPosition |
struct | Metrics |
struct | TexCoord |
struct | Texture |
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 410 of file qsgadaptationlayer_p.h.
QSGDistanceFieldGlyphCache::QSGDistanceFieldGlyphCache | ( | const QRawFont & | font, |
int | renderTypeQuality | ||
) |
Definition at line 32 of file qsgadaptationlayer.cpp.
References font, QRawFontPrivate::fontEngine, QRawFontPrivate::get(), QFontEngine::glyphCount(), 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 556 of file qsgadaptationlayer_p.h.
References glyphData(), QSGDistanceFieldGlyphCache::TexCoord::isValid(), and QSGDistanceFieldGlyphCache::GlyphData::texCoord.
|
inline |
Definition at line 455 of file qsgadaptationlayer_p.h.
References QT_DISTANCEFIELD_RADIUS(), and QT_DISTANCEFIELD_SCALE().
Referenced by QSGRhiDistanceFieldGlyphCache::requestGlyphs(), QSGDistanceFieldGlyphNode::updateGeometry(), and DistanceFieldOutlineTextMaterialRhiShader::updateUniformData().
|
inline |
Definition at line 460 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 451 of file qsgadaptationlayer_p.h.
Referenced by glyphMetrics(), and QSGDistanceFieldGlyphNode::updateGeometry().
|
inline |
Definition at line 459 of file qsgadaptationlayer_p.h.
Referenced by QSGRhiDistanceFieldGlyphCache::createFullSizeTextures(), and populate().
|
protected |
Definition at line 67 of file qsgadaptationlayer.cpp.
References QPainterPath::boundingRect(), QSGDistanceFieldGlyphCache::GlyphData::boundingRect, emptyData(), m_doubleGlyphResolution, m_referenceFont, QTransform::mapRect(), QSGDistanceFieldGlyphCache::GlyphData::path, 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 QSGDistanceFieldGlyphCache::GlyphData::boundingRect, fontScale(), glyphData(), QRectF::height(), QRectF::width(), QRectF::x(), and QRectF::y().
Referenced by QSGDistanceFieldGlyphNode::updateGeometry().
|
inline |
Definition at line 539 of file qsgadaptationlayer_p.h.
References glyphData(), and QSGDistanceFieldGlyphCache::GlyphData::texCoord.
Referenced by QSGRhiDistanceFieldGlyphCache::requestGlyphs(), QSGRhiDistanceFieldGlyphCache::storeGlyphs(), and QSGDistanceFieldGlyphNode::updateGeometry().
|
inline |
Definition at line 544 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 280 of file qsgadaptationlayer.cpp.
References QDataBuffer< Type >::add(), QList< T >::at(), i, and QList< T >::size().
Referenced by QSGRhiDistanceFieldGlyphCache::requestGlyphs().
Definition at line 97 of file qsgadaptationlayer.cpp.
References QList< T >::at(), QSGDistanceFieldGlyphCache::GlyphData::boundingRect, QSet< T >::contains(), glyphCount(), glyphData(), QSGDistanceFieldGlyphCache::TexCoord::height, i, QSet< T >::insert(), QSet< T >::isEmpty(), QRectF::isEmpty(), QSGDistanceFieldGlyphCache::TexCoord::isValid(), qWarning, QSGDistanceFieldGlyphCache::GlyphData::ref, referenceGlyphs(), requestGlyphs(), QList< T >::size(), QSGDistanceFieldGlyphCache::GlyphData::texCoord, and QSGDistanceFieldGlyphCache::TexCoord::width.
Referenced by QSGDistanceFieldGlyphNode::setGlyphs().
|
virtual |
Definition at line 246 of file qsgadaptationlayer.cpp.
|
inline |
Definition at line 449 of file qsgadaptationlayer_p.h.
|
protectedpure virtual |
Implemented in QSGRhiDistanceFieldGlyphCache.
Referenced by populate().
|
inline |
Definition at line 472 of file qsgadaptationlayer_p.h.
Referenced by QSGDistanceFieldGlyphNode::setGlyphs().
|
virtual |
Definition at line 236 of file qsgadaptationlayer.cpp.
References Q_UNUSED.
Referenced by QSGDistanceFieldGlyphNode::setGlyphs().
Definition at line 131 of file qsgadaptationlayer.cpp.
References QList< T >::at(), glyphData(), i, QSet< T >::insert(), QSGDistanceFieldGlyphCache::TexCoord::isNull(), QSGDistanceFieldGlyphCache::GlyphData::ref, releaseGlyphs(), QList< T >::size(), and QSGDistanceFieldGlyphCache::GlyphData::texCoord.
Referenced by QSGDistanceFieldGlyphNode::~QSGDistanceFieldGlyphNode().
|
protectedpure virtual |
Implemented in QSGRhiDistanceFieldGlyphCache.
Referenced by release().
Definition at line 549 of file qsgadaptationlayer_p.h.
References glyphData(), QSGDistanceFieldGlyphCache::GlyphData::texCoord, and QSGDistanceFieldGlyphCache::GlyphData::texture.
Referenced by QSGRhiDistanceFieldGlyphCache::requestGlyphs().
|
inline |
Definition at line 461 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 QList< T >::append(), QList< T >::at(), QIntrusiveList< N, member >::begin(), QSGDistanceFieldGlyphCache::GlyphData::boundingRect, QIntrusiveList< N, member >::end(), QSGDistanceFieldGlyphCache::GlyphPosition::glyph, glyphData(), QRectF::height(), QSGDistanceFieldGlyphCache::TexCoord::height, i, QList< T >::isEmpty(), QSGDistanceFieldGlyphCache::TexCoord::isNull(), iter, m_doubleGlyphResolution, QSGDistanceFieldGlyphCache::GlyphPosition::position, QT_DISTANCEFIELD_RADIUS(), QT_DISTANCEFIELD_SCALE(), QList< T >::size(), QSGDistanceFieldGlyphCache::GlyphData::texCoord, QRectF::width(), QSGDistanceFieldGlyphCache::TexCoord::width, QPointF::x(), QSGDistanceFieldGlyphCache::TexCoord::x, QSGDistanceFieldGlyphCache::TexCoord::xMargin, QPointF::y(), QSGDistanceFieldGlyphCache::TexCoord::y, and QSGDistanceFieldGlyphCache::TexCoord::yMargin.
Referenced by QSGRhiDistanceFieldGlyphCache::requestGlyphs().
|
protected |
Definition at line 251 of file qsgadaptationlayer.cpp.
References QList< T >::append(), QList< T >::at(), QIntrusiveList< N, member >::begin(), QIntrusiveList< N, member >::end(), glyphData(), i, QList< T >::isEmpty(), iter, j, QList< T >::size(), QSGDistanceFieldGlyphCache::Texture::size, and QSGDistanceFieldGlyphCache::GlyphData::texture.
Referenced by QSGRhiDistanceFieldGlyphCache::storeGlyphs().
|
protectedpure virtual |
Implemented in QSGRhiDistanceFieldGlyphCache.
Referenced by update().
|
inline |
Definition at line 473 of file qsgadaptationlayer_p.h.
Referenced by QSGDistanceFieldGlyphNode::~QSGDistanceFieldGlyphNode(), and QSGDistanceFieldGlyphNode::setGlyphs().
|
virtual |
Definition at line 241 of file qsgadaptationlayer.cpp.
References Q_UNUSED.
Referenced by QSGDistanceFieldGlyphNode::~QSGDistanceFieldGlyphNode(), and QSGDistanceFieldGlyphNode::setGlyphs().
void QSGDistanceFieldGlyphCache::update | ( | ) |
Definition at line 149 of file qsgadaptationlayer.cpp.
References QList< T >::append(), QDataBuffer< Type >::at(), QSet< T >::clear(), QElapsedTimer::elapsed(), QRawFont::familyName(), glyphData(), i, QDataBuffer< Type >::isEmpty(), m_doubleGlyphResolution, m_referenceFont, now, QElapsedTimer::nsecsElapsed(), QSGDistanceFieldGlyphCache::GlyphData::path, 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, QList< T >::reserve(), QDataBuffer< Type >::reset(), QDataBuffer< Type >::size(), QElapsedTimer::start(), and storeGlyphs().
|
protected |
Definition at line 287 of file qsgadaptationlayer.cpp.
References i, QSGDistanceFieldGlyphCache::Texture::size, and QSGDistanceFieldGlyphCache::Texture::texture.
|
protected |
Definition at line 522 of file qsgadaptationlayer_p.h.
Referenced by baseFontSize(), glyphData(), setGlyphsPosition(), and update().
|
protected |
Definition at line 526 of file qsgadaptationlayer_p.h.
Referenced by glyphData(), and update().
|
protected |
Definition at line 523 of file qsgadaptationlayer_p.h.
Referenced by baseFontSize().