diff options
author | Jani Hautakangas <ext-jani.hautakangas@nokia.com> | 2009-09-18 11:33:10 (GMT) |
---|---|---|
committer | Jani Hautakangas <ext-jani.hautakangas@nokia.com> | 2009-09-18 11:33:10 (GMT) |
commit | c78dabc55943b76479f7a84bae146f52cbc7bbbf (patch) | |
tree | 5ea4392cf14c1126c82603b9ee614c384f28bd9e /src/gui/text/qfontdatabase_s60.cpp | |
parent | 6454aca1b273daa2e54a77f83e1f6d4bae83427d (diff) | |
download | Qt-c78dabc55943b76479f7a84bae146f52cbc7bbbf.zip Qt-c78dabc55943b76479f7a84bae146f52cbc7bbbf.tar.gz Qt-c78dabc55943b76479f7a84bae146f52cbc7bbbf.tar.bz2 |
Introduce native Symbian bitmap support to QPixmap
This is done to reduce heap consumption and to give
a possibility to share bitmaps across process. QPixmap
maps to Symbian CFbsBitmap which is stored in Symbian
font and bitmap server.
Reviewed-by: Jason Barron
Diffstat (limited to 'src/gui/text/qfontdatabase_s60.cpp')
-rw-r--r-- | src/gui/text/qfontdatabase_s60.cpp | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/src/gui/text/qfontdatabase_s60.cpp b/src/gui/text/qfontdatabase_s60.cpp index e1a2c47..1a6bb11 100644 --- a/src/gui/text/qfontdatabase_s60.cpp +++ b/src/gui/text/qfontdatabase_s60.cpp @@ -45,9 +45,9 @@ #include "qfontengine_s60_p.h" #include "qabstractfileengine.h" #include "qdesktopservices.h" +#include "qpixmap_s60_p.h" #include "qt_s60_p.h" #include "qendian.h" -#include <private/qwindowsurface_s60_p.h> #include <private/qcore_symbian_p.h> #if defined(QT_NO_FREETYPE) #include <OPENFONT.H> @@ -217,7 +217,8 @@ static void initializeDb() if (!db->s60Store) db->s60Store = new QFontDatabaseS60StoreImplementation; - QS60WindowSurface::unlockBitmapHeap(); + QSymbianFbsHeapLock lock(QSymbianFbsHeapLock::Unlock); + const int numTypeFaces = QS60Data::screenDevice()->NumTypefaces(); const QFontDatabaseS60StoreImplementation *store = dynamic_cast<const QFontDatabaseS60StoreImplementation*>(db->s60Store); Q_ASSERT(store); @@ -271,8 +272,11 @@ static void initializeDb() } QS60Data::screenDevice()->ReleaseFont(font); } + Q_ASSERT(fontAdded); - QS60WindowSurface::lockBitmapHeap(); + + lock.relock(); + #else // defined(QT_NO_FREETYPE) QDir dir(QDesktopServices::storageLocation(QDesktopServices::FontsLocation)); dir.setNameFilters(QStringList() << QLatin1String("*.ttf") |