summaryrefslogtreecommitdiffstats
path: root/src/gui/text/qfont_p.h
diff options
context:
space:
mode:
authorEskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@nokia.com>2010-06-17 12:28:15 (GMT)
committerEskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@nokia.com>2010-06-21 13:22:19 (GMT)
commite5d437d6899904de2596b0ece4914274cff37561 (patch)
tree213066bb8744e336624a27fd51be3aed91a01bf6 /src/gui/text/qfont_p.h
parent49831f30f58d08a360d5947ba300aa3a3575d1fa (diff)
downloadQt-e5d437d6899904de2596b0ece4914274cff37561.zip
Qt-e5d437d6899904de2596b0ece4914274cff37561.tar.gz
Qt-e5d437d6899904de2596b0ece4914274cff37561.tar.bz2
Refactor QTextureGlyphCache
Separate getting the glyph coordinates from actually making and populating the cache. Calling populate() and fillInPendingGlyphs() immediately after should be equivalent to the old code, except it might have fewer reallocations of the texture since you will only create it one per set of glyphs. This mainly enables populating the GL glyph cache outside a GL context and then actually drawing into it later, when the context has actually been established. Reviewed-by: Kim
Diffstat (limited to 'src/gui/text/qfont_p.h')
-rw-r--r--src/gui/text/qfont_p.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/gui/text/qfont_p.h b/src/gui/text/qfont_p.h
index 470c109..646a8b8 100644
--- a/src/gui/text/qfont_p.h
+++ b/src/gui/text/qfont_p.h
@@ -192,6 +192,11 @@ public:
QFont smallCapsFont() const { return QFont(smallCapsFontPrivate()); }
QFontPrivate *smallCapsFontPrivate() const;
+ static QFontPrivate *get(const QFont &font)
+ {
+ return font.d.data();
+ }
+
void resolve(uint mask, const QFontPrivate *other);
private:
QFontPrivate &operator=(const QFontPrivate &) { return *this; }