From 0c30418556d978f730c33aa3bb066961981ccc9b Mon Sep 17 00:00:00 2001 From: Gunnar Sletta Date: Wed, 9 Dec 2009 15:15:35 +0100 Subject: Fix crash when rotating cleartype text under gl engine. Reviewed-by: Eskil --- src/gui/text/qfontengine_p.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/gui/text/qfontengine_p.h') diff --git a/src/gui/text/qfontengine_p.h b/src/gui/text/qfontengine_p.h index 728c344b52..62bff8536b 100644 --- a/src/gui/text/qfontengine_p.h +++ b/src/gui/text/qfontengine_p.h @@ -218,9 +218,9 @@ public: virtual HB_Error getPointInOutline(HB_Glyph glyph, int flags, hb_uint32 point, HB_Fixed *xpos, HB_Fixed *ypos, hb_uint32 *nPoints); - void setGlyphCache(void *key, QFontEngineGlyphCache *data); + void setGlyphCache(void *key, QFontEngineGlyphCache *data, QFontEngineGlyphCache::Type type); void setGlyphCache(QFontEngineGlyphCache::Type key, QFontEngineGlyphCache *data); - QFontEngineGlyphCache *glyphCache(void *key, const QTransform &transform) const; + QFontEngineGlyphCache *glyphCache(void *key, const QTransform &transform, QFontEngineGlyphCache::Type type) const; QFontEngineGlyphCache *glyphCache(QFontEngineGlyphCache::Type key, const QTransform &transform) const; static const uchar *getCMap(const uchar *table, uint tableSize, bool *isSymbolFont, int *cmapSize); -- cgit v1.2.3 From ab5d00edea76d3b1d38d6e7e59159042ec69f2f2 Mon Sep 17 00:00:00 2001 From: Gunnar Sletta Date: Thu, 10 Dec 2009 10:41:53 +0100 Subject: Clean up the QFontEngine glyphcaching code to not crash and be more tidy Reviewed-by: Eskil --- src/gui/text/qfontengine_p.h | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) (limited to 'src/gui/text/qfontengine_p.h') diff --git a/src/gui/text/qfontengine_p.h b/src/gui/text/qfontengine_p.h index 62bff8536b..a9883b4af7 100644 --- a/src/gui/text/qfontengine_p.h +++ b/src/gui/text/qfontengine_p.h @@ -56,6 +56,7 @@ #include "QtCore/qglobal.h" #include "QtCore/qatomic.h" #include +#include #include "private/qtextengine_p.h" #include "private/qfont_p.h" @@ -218,10 +219,8 @@ public: virtual HB_Error getPointInOutline(HB_Glyph glyph, int flags, hb_uint32 point, HB_Fixed *xpos, HB_Fixed *ypos, hb_uint32 *nPoints); - void setGlyphCache(void *key, QFontEngineGlyphCache *data, QFontEngineGlyphCache::Type type); - void setGlyphCache(QFontEngineGlyphCache::Type key, QFontEngineGlyphCache *data); - QFontEngineGlyphCache *glyphCache(void *key, const QTransform &transform, QFontEngineGlyphCache::Type type) const; - QFontEngineGlyphCache *glyphCache(QFontEngineGlyphCache::Type key, const QTransform &transform) const; + void setGlyphCache(void *key, QFontEngineGlyphCache *data); + QFontEngineGlyphCache *glyphCache(void *key, QFontEngineGlyphCache::Type type, const QTransform &transform) const; static const uchar *getCMap(const uchar *table, uint tableSize, bool *isSymbolFont, int *cmapSize); static quint32 getTrueTypeGlyphIndex(const uchar *cmap, uint unicode); @@ -254,12 +253,13 @@ protected: static const QVector &grayPalette(); private: - /// remove old entries from the glyph cache. Helper method for the setGlyphCache ones. - void expireGlyphCache(); + struct GlyphCacheEntry { + void *context; + QFontEngineGlyphCache *cache; + bool operator==(const GlyphCacheEntry &other) { return context == other.context && cache == other.cache; } + }; - GlyphPointerHash m_glyphPointerHash; - GlyphIntHash m_glyphIntHash; - mutable QList m_glyphCacheQueue; + mutable QLinkedList m_glyphCaches; }; inline bool operator ==(const QFontEngine::FaceId &f1, const QFontEngine::FaceId &f2) -- cgit v1.2.3 From da19e7f6b6b822f7a473c4eb2dff001a3434353a Mon Sep 17 00:00:00 2001 From: Jason McDonald Date: Thu, 7 Jan 2010 00:02:09 +1000 Subject: Update copyright year to 2010 Reviewed-by: Trust Me --- src/gui/text/qfontengine_p.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/gui/text/qfontengine_p.h') diff --git a/src/gui/text/qfontengine_p.h b/src/gui/text/qfontengine_p.h index a9883b4af7..71ab5a57d6 100644 --- a/src/gui/text/qfontengine_p.h +++ b/src/gui/text/qfontengine_p.h @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). +** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). ** All rights reserved. ** Contact: Nokia Corporation (qt-info@nokia.com) ** -- cgit v1.2.3