summaryrefslogtreecommitdiffstats
path: root/src/gui/text/qfontengine_s60.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/gui/text/qfontengine_s60.cpp')
-rw-r--r--src/gui/text/qfontengine_s60.cpp15
1 files changed, 10 insertions, 5 deletions
diff --git a/src/gui/text/qfontengine_s60.cpp b/src/gui/text/qfontengine_s60.cpp
index ab2506c..88ae8f6 100644
--- a/src/gui/text/qfontengine_s60.cpp
+++ b/src/gui/text/qfontengine_s60.cpp
@@ -43,9 +43,9 @@
#include "qtextengine_p.h"
#include "qglobal.h"
#include <private/qapplication_p.h>
-#include <private/qwindowsurface_s60_p.h>
#include "qimage.h"
#include "qt_s60_p.h"
+#include "qpixmap_s60_p.h"
#include <e32base.h>
#include <e32std.h>
@@ -136,7 +136,9 @@ QFontEngineS60::QFontEngineS60(const QFontDef &request, const QFontEngineS60Exte
QFontEngine::fontDef = request;
m_fontSizeInPixels = (request.pixelSize >= 0)?
request.pixelSize:pointsToPixels(request.pointSize);
- QS60WindowSurface::unlockBitmapHeap();
+
+ QSymbianFbsHeapLock lock(QSymbianFbsHeapLock::Unlock);
+
m_textRenderBitmap = q_check_ptr(new CFbsBitmap()); // CBase derived object needs check on new
const TSize bitmapSize(1, 1); // It is just a dummy bitmap that I need to keep the font alive (or maybe not)
qt_symbian_throwIfError(m_textRenderBitmap->Create(bitmapSize, EGray256));
@@ -151,12 +153,14 @@ QFontEngineS60::QFontEngineS60(const QFontDef &request, const QFontEngineS60Exte
const TInt errorCode = m_textRenderBitmapDevice->GetNearestFontInPixels(m_font, fontSpec);
Q_ASSERT(errorCode == 0);
m_textRenderBitmapGc->UseFont(m_font);
- QS60WindowSurface::lockBitmapHeap();
+
+ lock.relock();
}
QFontEngineS60::~QFontEngineS60()
{
- QS60WindowSurface::unlockBitmapHeap();
+ QSymbianFbsHeapLock lock(QSymbianFbsHeapLock::Unlock);
+
m_textRenderBitmapGc->DiscardFont();
delete m_textRenderBitmapGc;
m_textRenderBitmapGc = NULL;
@@ -165,7 +169,8 @@ QFontEngineS60::~QFontEngineS60()
m_textRenderBitmapDevice = NULL;
delete m_textRenderBitmap;
m_textRenderBitmap = NULL;
- QS60WindowSurface::lockBitmapHeap();
+
+ lock.relock();
}
bool QFontEngineS60::stringToCMap(const QChar *characters, int len, QGlyphLayout *glyphs, int *nglyphs, QTextEngine::ShaperFlags flags) const