summaryrefslogtreecommitdiffstats
path: root/src/gui/text/qfont_s60.cpp
diff options
context:
space:
mode:
authorJani Hautakangas <ext-jani.hautakangas@nokia.com>2009-09-18 11:33:10 (GMT)
committerJani Hautakangas <ext-jani.hautakangas@nokia.com>2009-09-18 11:33:10 (GMT)
commitc78dabc55943b76479f7a84bae146f52cbc7bbbf (patch)
tree5ea4392cf14c1126c82603b9ee614c384f28bd9e /src/gui/text/qfont_s60.cpp
parent6454aca1b273daa2e54a77f83e1f6d4bae83427d (diff)
downloadQt-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/qfont_s60.cpp')
-rw-r--r--src/gui/text/qfont_s60.cpp9
1 files changed, 6 insertions, 3 deletions
diff --git a/src/gui/text/qfont_s60.cpp b/src/gui/text/qfont_s60.cpp
index 30e00ff..277d88f 100644
--- a/src/gui/text/qfont_s60.cpp
+++ b/src/gui/text/qfont_s60.cpp
@@ -41,7 +41,7 @@
#include "qfont.h"
#include "qt_s60_p.h"
-#include <private/qwindowsurface_s60_p.h>
+#include "qpixmap_s60_p.h"
#include "qmutex.h"
QT_BEGIN_NAMESPACE
@@ -57,14 +57,17 @@ QString QFont::lastResortFamily() const
QMutexLocker locker(lastResortFamilyMutex());
static QString family;
if (family.isEmpty()) {
- QS60WindowSurface::unlockBitmapHeap();
+
+ QSymbianFbsHeapLock lock(QSymbianFbsHeapLock::Unlock);
+
CFont *font;
const TInt err = S60->screenDevice()->GetNearestFontInTwips(font, TFontSpec());
Q_ASSERT(err == KErrNone);
const TFontSpec spec = font->FontSpecInTwips();
family = QString((const QChar *)spec.iTypeface.iName.Ptr(), spec.iTypeface.iName.Length());
S60->screenDevice()->ReleaseFont(font);
- QS60WindowSurface::lockBitmapHeap();
+
+ lock.relock();
}
return family;
#else