diff options
author | Jani Hautakangas <ext-jani.hautakangas@nokia.com> | 2009-09-18 14:33:10 +0300 |
---|---|---|
committer | Jani Hautakangas <ext-jani.hautakangas@nokia.com> | 2009-09-18 14:33:10 +0300 |
commit | c78dabc55943b76479f7a84bae146f52cbc7bbbf (patch) | |
tree | 5ea4392cf14c1126c82603b9ee614c384f28bd9e /src/gui/styles | |
parent | 6454aca1b273daa2e54a77f83e1f6d4bae83427d (diff) | |
download | qt4-tools-c78dabc55943b76479f7a84bae146f52cbc7bbbf.tar.gz |
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/styles')
-rw-r--r-- | src/gui/styles/qs60style_s60.cpp | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/src/gui/styles/qs60style_s60.cpp b/src/gui/styles/qs60style_s60.cpp index 4fdf48bdb7..131d8bc359 100644 --- a/src/gui/styles/qs60style_s60.cpp +++ b/src/gui/styles/qs60style_s60.cpp @@ -44,8 +44,8 @@ #include "qpainter.h" #include "qstyleoption.h" #include "qstyle.h" -#include "private/qwindowsurface_s60_p.h" #include "private/qt_s60_p.h" +#include "private/qpixmap_s60_p.h" #include "private/qcore_symbian_p.h" #include "qapplication.h" @@ -1136,11 +1136,13 @@ QPixmap QS60StyleModeSpecifics::generateMissingThemeGraphic(QS60StyleEnums::Skin QPixmap QS60StylePrivate::part(QS60StyleEnums::SkinParts part, const QSize &size, SkinElementFlags flags) { - QS60WindowSurface::unlockBitmapHeap(); + QSymbianFbsHeapLock lock(QSymbianFbsHeapLock::Unlock); + QPixmap result = (flags & SF_ColorSkinned)? QS60StyleModeSpecifics::colorSkinnedGraphics(part, size, flags) : QS60StyleModeSpecifics::skinnedGraphics(part, size, flags); - QS60WindowSurface::lockBitmapHeap(); + + lock.relock(); if (flags & SF_StateDisabled && !QS60StyleModeSpecifics::disabledPartGraphic(part)) { QStyleOption opt; @@ -1158,9 +1160,9 @@ QPixmap QS60StylePrivate::part(QS60StyleEnums::SkinParts part, QPixmap QS60StylePrivate::frame(SkinFrameElements frame, const QSize &size, SkinElementFlags flags) { - QS60WindowSurface::unlockBitmapHeap(); + QSymbianFbsHeapLock lock(QSymbianFbsHeapLock::Unlock); QPixmap result = QS60StyleModeSpecifics::skinnedGraphics(frame, size, flags); - QS60WindowSurface::lockBitmapHeap(); + lock.relock(); if (flags & SF_StateDisabled && !QS60StyleModeSpecifics::disabledFrameGraphic(frame)) { QStyleOption opt; |