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

#include <qopengltextureglyphcache_p.h>

+ Inheritance diagram for QOpenGLTextureGlyphCache:
+ Collaboration diagram for QOpenGLTextureGlyphCache:

Public Types

enum  FilterMode { Nearest , Linear }
 

Public Member Functions

 QOpenGLTextureGlyphCache (QFontEngine::GlyphFormat glyphFormat, const QTransform &matrix, const QColor &color=QColor())
 
 ~QOpenGLTextureGlyphCache ()
 
virtual void createTextureData (int width, int height) override
 
virtual void resizeTextureData (int width, int height) override
 
virtual void fillTexture (const Coord &c, glyph_t glyph, const QFixedPoint &subPixelPosition) override
 
virtual int glyphPadding () const override
 
virtual int maxTextureWidth () const override
 
virtual int maxTextureHeight () const override
 
GLuint texture () const
 
int width () const
 
int height () const
 
void setPaintEnginePrivate (QOpenGL2PaintEngineExPrivate *p)
 
const QOpenGLContextGroupcontextGroup () const
 
int serialNumber () const
 
FilterMode filterMode () const
 
void setFilterMode (FilterMode m)
 
void clear ()
 
QOpenGL2PaintEngineExPrivatepaintEnginePrivate () 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 ()
 
virtual void beginFillTexture ()
 
virtual void endFillTexture ()
 
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 74 of file qopengltextureglyphcache_p.h.

Member Enumeration Documentation

◆ FilterMode

Enumerator
Nearest 
Linear 

Definition at line 112 of file qopengltextureglyphcache_p.h.

Constructor & Destructor Documentation

◆ QOpenGLTextureGlyphCache()

QOpenGLTextureGlyphCache::QOpenGLTextureGlyphCache ( QFontEngine::GlyphFormat glyphFormat,
const QTransform & matrix,
const QColor & color = QColor() )

Definition at line 20 of file qopengltextureglyphcache.cpp.

References QOpenGLContext::currentContext(), and qDebug.

+ Here is the call graph for this function:

◆ ~QOpenGLTextureGlyphCache()

QOpenGLTextureGlyphCache::~QOpenGLTextureGlyphCache ( )

Definition at line 51 of file qopengltextureglyphcache.cpp.

References clear(), and qDebug.

+ Here is the call graph for this function:

Member Function Documentation

◆ clear()

void QOpenGLTextureGlyphCache::clear ( )

Definition at line 437 of file qopengltextureglyphcache.cpp.

References QOpenGLSharedResource::free(), QTextureGlyphCache::m_currentRowHeight, QTextureGlyphCache::m_cx, QTextureGlyphCache::m_cy, QTextureGlyphCache::m_h, and QTextureGlyphCache::m_w.

Referenced by ~QOpenGLTextureGlyphCache().

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

◆ contextGroup()

const QOpenGLContextGroup * QOpenGLTextureGlyphCache::contextGroup ( ) const
inline

Definition at line 108 of file qopengltextureglyphcache_p.h.

◆ createTextureData()

void QOpenGLTextureGlyphCache::createTextureData ( int width,
int height )
overridevirtual

◆ fillTexture()

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

Reimplemented from QImageTextureGlyphCache.

Definition at line 388 of file qopengltextureglyphcache.cpp.

References QOpenGLContext::currentContext(), QImageTextureGlyphCache::fillTexture(), QImageTextureGlyphCache::image(), load_glyph_image_region_to_texture(), load_glyph_image_to_texture(), QOpenGLGlyphTexture::m_texture, qWarning, and QTextureGlyphCache::textureMapForGlyph().

+ Here is the call graph for this function:

◆ filterMode()

FilterMode QOpenGLTextureGlyphCache::filterMode ( ) const
inline

Definition at line 116 of file qopengltextureglyphcache_p.h.

◆ glyphPadding()

int QOpenGLTextureGlyphCache::glyphPadding ( ) const
overridevirtual

Reimplemented from QTextureGlyphCache.

Definition at line 408 of file qopengltextureglyphcache.cpp.

References QFontEngine::Format_Mono, and QFontEngineGlyphCache::m_format.

◆ height()

int QOpenGLTextureGlyphCache::height ( ) const
inline

Definition at line 100 of file qopengltextureglyphcache_p.h.

References QOpenGLGlyphTexture::m_height.

Referenced by createTextureData().

+ Here is the caller graph for this function:

◆ maxTextureHeight()

int QOpenGLTextureGlyphCache::maxTextureHeight ( ) const
overridevirtual

Reimplemented from QTextureGlyphCache.

Definition at line 425 of file qopengltextureglyphcache.cpp.

References QOpenGLContext::currentContext(), QTextureGlyphCache::maxTextureHeight(), and qMin().

+ Here is the call graph for this function:

◆ maxTextureWidth()

int QOpenGLTextureGlyphCache::maxTextureWidth ( ) const
overridevirtual

Reimplemented from QTextureGlyphCache.

Definition at line 416 of file qopengltextureglyphcache.cpp.

References QOpenGLContext::currentContext(), and QTextureGlyphCache::maxTextureWidth().

+ Here is the call graph for this function:

◆ paintEnginePrivate()

QOpenGL2PaintEngineExPrivate * QOpenGLTextureGlyphCache::paintEnginePrivate ( ) const
inline

Definition at line 121 of file qopengltextureglyphcache_p.h.

◆ resizeTextureData()

void QOpenGLTextureGlyphCache::resizeTextureData ( int width,
int height )
overridevirtual

Reimplemented from QImageTextureGlyphCache.

Definition at line 240 of file qopengltextureglyphcache.cpp.

References QOpenGLShaderProgram::addCacheableShaderFromSourceCode(), QOpenGLShaderProgram::bind(), QOpenGLVertexArrayObject::bind(), QOpenGLShaderProgram::bindAttributeLocation(), QOpenGLEngineShaderManager::blitProgram(), BrushDrawingMode, QSurfaceFormat::CoreProfile, createTextureData(), QOpenGLContext::currentContext(), QOpenGLShaderProgram::disableAttributeArray(), QOpenGLShader::Fragment, funcs, GL_CLAMP_TO_EDGE, GL_COLOR_ATTACHMENT0, GL_FRAMEBUFFER, GL_FRAMEBUFFER_BINDING, GL_RENDERBUFFER, GL_RGBA, GL_TEXTURE0, GL_UNSIGNED_BYTE, GLint(), GLuint, QOpenGL2PaintEngineExPrivate::height, QImageTextureGlyphCache::image(), isCoreProfile(), QOpenGLVertexArrayObject::isCreated(), QOpenGLShaderProgram::link(), load_glyph_image_region_to_texture(), QOpenGLGlyphTexture::m_fbo, QOpenGLGlyphTexture::m_height, QOpenGLGlyphTexture::m_texture, QOpenGLGlyphTexture::m_width, Nearest, qMin(), qopenglslImageSrcFragmentShader, qopenglslMainFragmentShader, qopenglslMainWithTexCoordsVertexShader, qopenglslUntransformedPositionVertexShader, QT_IMAGE_TEXTURE_UNIT, QT_TEXTURE_COORDS_ATTR, QT_VERTEX_COORDS_ATTR, qWarning, QOpenGLVertexArrayObject::release(), QImageTextureGlyphCache::resizeTextureData(), QOpenGLShaderProgram::setUniformValue(), QOpenGL2PaintEngineExPrivate::shaderManager, QOpenGL2PaintEngineExPrivate::transferMode(), QOpenGL2PaintEngineExPrivate::updateClipScissorTest(), QOpenGL2PaintEngineExPrivate::uploadData(), QOpenGLEngineShaderManager::useBlitProgram(), QOpenGLShader::Vertex, and QOpenGL2PaintEngineExPrivate::width.

+ Here is the call graph for this function:

◆ serialNumber()

int QOpenGLTextureGlyphCache::serialNumber ( ) const
inline

Definition at line 110 of file qopengltextureglyphcache_p.h.

◆ setFilterMode()

void QOpenGLTextureGlyphCache::setFilterMode ( FilterMode m)
inline

Definition at line 117 of file qopengltextureglyphcache_p.h.

◆ setPaintEnginePrivate()

void QOpenGLTextureGlyphCache::setPaintEnginePrivate ( QOpenGL2PaintEngineExPrivate * p)
inline

Definition at line 106 of file qopengltextureglyphcache_p.h.

◆ texture()

GLuint QOpenGLTextureGlyphCache::texture ( ) const
inline

Definition at line 89 of file qopengltextureglyphcache_p.h.

References QOpenGLGlyphTexture::m_texture.

◆ width()

int QOpenGLTextureGlyphCache::width ( ) const
inline

Definition at line 95 of file qopengltextureglyphcache_p.h.

References QOpenGLGlyphTexture::m_width.

Referenced by createTextureData().

+ Here is the caller graph for this function:

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