diff options
author | Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io> | 2018-07-08 11:23:24 +0200 |
---|---|---|
committer | Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io> | 2018-08-17 11:06:20 +0000 |
commit | 36c6b727c5f433ce3f22e18d93e2502df1c526aa (patch) | |
tree | 4c57debdf593897440d9d012935bfca16ba7cb66 /src/quick/scenegraph/qsgadaptationlayer_p.h | |
parent | 9fbdc8c4c2c028427b19907d636a7a83d79cbd09 (diff) |
Load pregenerated glyph cache in default DF cache
In order to support quick loading of scenes with lots of text,
we support preloading the contents of the distance field cache
from a generated file instead of creating all the distance fields
on startup.
The idea is that when creating a distance field cache for a specific
font, the data will be prepopulated. This is stored in a table in
the font file and is picked up automatically by Qt when available.
[ChangeLog][Text] Support pregenerated loading distance field
glyph caches to decrease startup time for applications with
large amounts of text.
Task-number: QTBUG-69356
Change-Id: I7cff0c4c782f819b1c893041405970ea4553fb8d
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
Diffstat (limited to 'src/quick/scenegraph/qsgadaptationlayer_p.h')
-rw-r--r-- | src/quick/scenegraph/qsgadaptationlayer_p.h | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/src/quick/scenegraph/qsgadaptationlayer_p.h b/src/quick/scenegraph/qsgadaptationlayer_p.h index 5a465831cb..ba5c4353b2 100644 --- a/src/quick/scenegraph/qsgadaptationlayer_p.h +++ b/src/quick/scenegraph/qsgadaptationlayer_p.h @@ -83,6 +83,7 @@ class QSGGlyphNode; class QSGRootNode; class QSGSpriteNode; class QSGRenderNode; +class QSGRenderContext; class Q_QUICK_PRIVATE_EXPORT QSGNodeVisitorEx { @@ -507,6 +508,7 @@ protected: uint textureIdForGlyph(glyph_t glyph) const; GlyphData &glyphData(glyph_t glyph); + GlyphData &emptyData(glyph_t glyph); #if defined(QSG_DISTANCEFIELD_CACHE_DEBUG) void saveTexture(GLuint textureId, int width, int height) const; @@ -514,11 +516,14 @@ protected: inline bool isCoreProfile() const { return m_coreProfile; } -private: + bool m_doubleGlyphResolution; + +protected: QRawFont m_referenceFont; + +private: int m_glyphCount; - bool m_doubleGlyphResolution; bool m_coreProfile; QList<Texture> m_textures; |