diff options
Diffstat (limited to 'src/quick/scenegraph/qsgdefaultglyphnode_p_p.h')
-rw-r--r-- | src/quick/scenegraph/qsgdefaultglyphnode_p_p.h | 23 |
1 files changed, 14 insertions, 9 deletions
diff --git a/src/quick/scenegraph/qsgdefaultglyphnode_p_p.h b/src/quick/scenegraph/qsgdefaultglyphnode_p_p.h index b0a2788dd8..cd1b331278 100644 --- a/src/quick/scenegraph/qsgdefaultglyphnode_p_p.h +++ b/src/quick/scenegraph/qsgdefaultglyphnode_p_p.h @@ -57,7 +57,8 @@ #include <QtQuick/qsgtexture.h> #include <QtQuick/qsggeometry.h> #include <qshareddata.h> -#include <QtQuick/private/qsgtexture_p.h> +#include <QtQuick/private/qsgplaintexture_p.h> +#include <QtQuick/private/qsgrhitextureglyphcache_p.h> #include <qrawfont.h> #include <qmargins.h> @@ -65,10 +66,13 @@ QT_BEGIN_NAMESPACE class QFontEngine; class Geometry; +class QSGRenderContext; +class QSGDefaultRenderContext; + class QSGTextMaskMaterial: public QSGMaterial { public: - QSGTextMaskMaterial(const QRawFont &font, QFontEngine::GlyphFormat glyphFormat = QFontEngine::Format_None); + QSGTextMaskMaterial(QSGRenderContext *rc, const QRawFont &font, QFontEngine::GlyphFormat glyphFormat = QFontEngine::Format_None); virtual ~QSGTextMaskMaterial(); QSGMaterialType *type() const override; @@ -81,12 +85,12 @@ public: QSGTexture *texture() const { return m_texture; } - int cacheTextureWidth() const; - int cacheTextureHeight() const; - bool ensureUpToDate(); - QOpenGLTextureGlyphCache *glyphCache() const; + QTextureGlyphCache *glyphCache() const; + QOpenGLTextureGlyphCache *openglGlyphCache() const; + QSGRhiTextureGlyphCache *rhiGlyphCache() const; + void populate(const QPointF &position, const QVector<quint32> &glyphIndexes, const QVector<QPointF> &glyphPositions, QSGGeometry *geometry, QRectF *boundingRect, QPointF *baseLine, @@ -95,9 +99,11 @@ public: private: void init(QFontEngine::GlyphFormat glyphFormat); + QSGDefaultRenderContext *m_rc; QSGPlainTexture *m_texture; QExplicitlySharedDataPointer<QFontEngineGlyphCache> m_glyphCache; QRawFont m_font; + QRhi *m_rhi; QVector4D m_color; QSize m_size; }; @@ -105,7 +111,7 @@ private: class QSGStyledTextMaterial : public QSGTextMaskMaterial { public: - QSGStyledTextMaterial(const QRawFont &font); + QSGStyledTextMaterial(QSGRenderContext *rc, const QRawFont &font); virtual ~QSGStyledTextMaterial() { } void setStyleShift(const QVector2D &shift) { m_styleShift = shift; } @@ -117,7 +123,6 @@ public: QSGMaterialType *type() const override; QSGMaterialShader *createShader() const override; - int compare(const QSGMaterial *other) const override; private: @@ -128,7 +133,7 @@ private: class QSGOutlinedTextMaterial : public QSGStyledTextMaterial { public: - QSGOutlinedTextMaterial(const QRawFont &font); + QSGOutlinedTextMaterial(QSGRenderContext *rc, const QRawFont &font); ~QSGOutlinedTextMaterial() { } QSGMaterialType *type() const override; |