summaryrefslogtreecommitdiffstats
path: root/src/gui/image
diff options
context:
space:
mode:
authoraxis <qt-info@nokia.com>2009-11-04 10:18:15 (GMT)
committeraxis <qt-info@nokia.com>2009-11-04 10:18:15 (GMT)
commit67105efc1e1ebfb435ad5d64171111799959a7c3 (patch)
tree9f330a35f0e0bf48ae844f4eceea84ba001568f1 /src/gui/image
parentbffb6602177476f08710b40a83205b9ab839f6f4 (diff)
parentfc45c07c27100591750ad5c360fde535e15b9dbd (diff)
downloadQt-67105efc1e1ebfb435ad5d64171111799959a7c3.zip
Qt-67105efc1e1ebfb435ad5d64171111799959a7c3.tar.gz
Qt-67105efc1e1ebfb435ad5d64171111799959a7c3.tar.bz2
Merge branch '4.6-s60' into 4.6
Diffstat (limited to 'src/gui/image')
-rw-r--r--src/gui/image/qpixmap_s60.cpp22
1 files changed, 11 insertions, 11 deletions
diff --git a/src/gui/image/qpixmap_s60.cpp b/src/gui/image/qpixmap_s60.cpp
index 7f0a504..49a8942 100644
--- a/src/gui/image/qpixmap_s60.cpp
+++ b/src/gui/image/qpixmap_s60.cpp
@@ -73,27 +73,27 @@ const uchar qt_pixmap_bit_mask[] = { 0x01, 0x02, 0x04, 0x08,
used to lock the global bitmap heap. Only used in
S60 v3.1 and S60 v3.2.
*/
+_LIT(KFBSERVLargeBitmapAccessName,"FbsLargeBitmapAccess");
class QSymbianFbsClient
{
public:
- QSymbianFbsClient() : heapLock(0), heapLocked(false)
+ QSymbianFbsClient() : heapLocked(false)
{
- QT_TRAP_THROWING(heapLock = new(ELeave) CFbsBitmap);
- heapLock->Create(TSize(0,0), S60->screenDevice()->DisplayMode());
+ heapLock.OpenGlobal(KFBSERVLargeBitmapAccessName);
}
~QSymbianFbsClient()
{
- delete heapLock;
+ heapLock.Close();
}
bool lockHeap()
{
bool wasLocked = heapLocked;
- if (heapLock && !heapLocked) {
- heapLock->LockHeap(ETrue);
+ if (heapLock.Handle() && !heapLocked) {
+ heapLock.Wait();
heapLocked = true;
}
@@ -104,8 +104,8 @@ public:
{
bool wasLocked = heapLocked;
- if (heapLock && heapLocked) {
- heapLock->UnlockHeap(ETrue);
+ if (heapLock.Handle() && heapLocked) {
+ heapLock.Signal();
heapLocked = false;
}
@@ -115,7 +115,7 @@ public:
private:
- CFbsBitmap *heapLock;
+ RMutex heapLock;
bool heapLocked;
};
@@ -169,7 +169,7 @@ public:
inline void beginDataAccess(CFbsBitmap *bitmap)
{
- if (symbianVersion == QSysInfo::SV_9_2 || symbianVersion == QSysInfo::SV_9_3)
+ if (symbianVersion == QSysInfo::SV_9_2)
heapWasLocked = qt_symbianFbsClient()->lockHeap();
else
bitmap->LockHeap(ETrue);
@@ -177,7 +177,7 @@ public:
inline void endDataAccess(CFbsBitmap *bitmap)
{
- if (symbianVersion == QSysInfo::SV_9_2 || symbianVersion == QSysInfo::SV_9_3) {
+ if (symbianVersion == QSysInfo::SV_9_2) {
if (!heapWasLocked)
qt_symbianFbsClient()->unlockHeap();
} else {