src/hbservers/hbthemeserver/hbthemeserver_symbian_p_p.h
changeset 21 4633027730f5
parent 7 923ff622b8b9
child 23 e6ad4ef83b23
equal deleted inserted replaced
7:923ff622b8b9 21:4633027730f5
    35 #include <QChar>
    35 #include <QChar>
    36 
    36 
    37 #include "hbthemecommon_p.h"
    37 #include "hbthemecommon_p.h"
    38 #include "hbthemecommon_symbian_p.h"
    38 #include "hbthemecommon_symbian_p.h"
    39 #include "hbicondatacache_p.h"
    39 #include "hbicondatacache_p.h"
    40 #include "hbcache_p.h"
       
    41 #include "hbthemewatcher_symbian_p.h"
    40 #include "hbthemewatcher_symbian_p.h"
    42 #include <e32property.h>
    41 #include <e32property.h>
    43 #include <e32base.h>
    42 #include <e32base.h>
    44 #include <f32file.h>
    43 #include <f32file.h>
    45 
    44 
    89     void setMaxGpuCacheSize(int size);
    88     void setMaxGpuCacheSize(int size);
    90     void setMaxCpuCacheSize(int size);
    89     void setMaxCpuCacheSize(int size);
    91     void CleanupSessionIconItem(HbIconKey key);
    90     void CleanupSessionIconItem(HbIconKey key);
    92     void clearIconCache();
    91     void clearIconCache();
    93 
    92 
    94     bool insertCssCacheItem(const QString &key,  HbCacheItem *item);
       
    95     HbCacheItem * cssCacheItem(const QString &key);
       
    96     void CleanupSessionCssItem(QString key);
       
    97     void clearCssCache();
       
    98     void MemoryGood();
    93     void MemoryGood();
    99     void FreeGpuRam(int bytes, bool useSwRendering);
    94     void FreeGpuRam(int bytes, bool useSwRendering);
       
    95     void freeGpuRam();
   100     void freeUnusedGpuResources();
    96     void freeUnusedGpuResources();
   101     
    97     
   102     void doCleanup();
       
   103     static bool gpuMemoryState();
    98     static bool gpuMemoryState();
   104 
    99 
   105     bool openCurrentIndexFile();
   100     bool openCurrentIndexFile();
   106     HbRenderingMode currentRenderingMode() const;
   101     HbRenderingMode currentRenderingMode() const;
       
   102     HbRenderingMode expectedRenderingMode(HbRenderingMode requsetedRenderingMode) const;
   107     void setCurrentRenderingMode(HbRenderingMode currentMode);
   103     void setCurrentRenderingMode(HbRenderingMode currentMode);
   108     void HandleThemeSelection( const QString& themeName);
   104     void HandleThemeSelection( const QString& themeName);
   109 
   105 
   110     int freeSharedMemory();
   106     int freeSharedMemory();
   111     int allocatedSharedMemory();
   107     int allocatedSharedMemory();
   112     int allocatedHeapMemory();
   108     int allocatedHeapMemory();
   113     int gpuLRUSize() const;
   109     int gpuLRUSize() const;
       
   110     unsigned long freeGPUMemory();
       
   111     unsigned long totalGPUMemory();
       
   112     int cachedSgImagesCount() const;
       
   113     int cachedPixmapCount() const;
   114 //Debug Code for Test Purpose
   114 //Debug Code for Test Purpose
   115 #ifdef HB_ICON_CACHE_DEBUG
   115 #ifdef HB_ICON_CACHE_DEBUG
   116     int cacheIconCount() const;
   116     int cacheIconCount() const;
   117     int memorySize(const QString &mem);
   117     int memorySize(const QString &mem);
   118     int freeVectorMemory();
   118     int freeVectorMemory();
   127     int serverHeapSize();
   127     int serverHeapSize();
   128     void cleanRasterLRUList();
   128     void cleanRasterLRUList();
   129     void cleanVectorLRUList();
   129     void cleanVectorLRUList();
   130     int rasterLruCount();
   130     int rasterLruCount();
   131     int vectorLruCount();
   131     int vectorLruCount();
   132     unsigned long freeGPUMemory();
       
   133     unsigned long totalGPUMemory();
       
   134 #if defined(Q_OS_SYMBIAN)
   132 #if defined(Q_OS_SYMBIAN)
   135     int iconRefCount(const RMessage2& aMessage);
   133     int iconRefCount(const RMessage2& aMessage);
   136 #endif
   134 #endif
   137 
   135 
   138 #endif
   136 #endif
   144 
   142 
   145 private:
   143 private:
   146     void ConstructL();
   144     void ConstructL();
   147     void UpdateThemeIndexes(bool updateBase = true);
   145     void UpdateThemeIndexes(bool updateBase = true);
   148     HbIconDataCache * cache;
   146     HbIconDataCache * cache;
   149     HbCache* cssCache;
       
   150 
   147 
   151     static bool gpuGoodMemoryState;
   148     static bool gpuGoodMemoryState;
   152     HbRenderingMode renderMode;
   149     HbRenderingMode renderMode;
   153     CHbThemeChangeNotificationListener * iListener;
   150     CHbThemeChangeNotificationListener * iListener;
   154     CHbThemeWatcher *iWatcher;
   151     CHbThemeWatcher *iWatcher;
   168     ~HbThemeServerSession();
   165     ~HbThemeServerSession();
   169     void ServiceL(const RMessage2 & aMessage);
   166     void ServiceL(const RMessage2 & aMessage);
   170     void DispatchMessageL(const RMessage2 & aMessage);
   167     void DispatchMessageL(const RMessage2 & aMessage);
   171     void GetSharedIconInfoL(const RMessage2 & aMessage);
   168     void GetSharedIconInfoL(const RMessage2 & aMessage);
   172     void HandleStyleSheetLookupL(const RMessage2 & aMessage);
   169     void HandleStyleSheetLookupL(const RMessage2 & aMessage);
       
   170     void HandleMissedHbCssLookupL(const RMessage2 &aMessage);
   173     void HandleWidgetMLLookupL(const RMessage2& aMessage);
   171     void HandleWidgetMLLookupL(const RMessage2& aMessage);
   174     void HandleDeviceProfilesReqL(const RMessage2& aMessage);
   172     void HandleDeviceProfilesReqL(const RMessage2& aMessage);
   175     void HandleEffectAddAndFileLookupL(const RMessage2 &aMessage);
   173     void HandleEffectAddAndFileLookupL(const RMessage2 &aMessage);
   176     QColor GetColorFromRgba(TUint32 aRgba, bool aColorFlag);
   174     QColor GetColorFromRgba(TUint32 aRgba, bool aColorFlag);
       
   175     HbIconCacheItem* getCachedIcon(HbIconKey & key, const QString & format);
   177     void GetSharedMultiIconInfoL(const RMessage2& aMessage);
   176     void GetSharedMultiIconInfoL(const RMessage2& aMessage);
   178     void GetMultiIconInfoL(const RMessage2& aMessage);
   177     void GetMultiIconInfoL(const RMessage2& aMessage);
   179     TMultiIconSymbParams ReadMessageAndRetrieveMultiIconParams(const RMessage2& aMessage);
   178     TMultiIconSymbParams ReadMessageAndRetrieveMultiIconParams(const RMessage2& aMessage);
   180     void GetDataFromCacheItem(HbIconCacheItem* cacheItem, HbSharedIconInfo &data) const;
   179     void GetDataFromCacheItem(HbIconCacheItem* cacheItem, HbSharedIconInfo &data) const;
   181     void FreeDataFromCacheItem(HbIconCacheItem* cacheItem);
   180     void FreeDataFromCacheItem(HbIconCacheItem* cacheItem);
   182     bool IconInfoFromSingleIcon(HbIconKey key, HbSharedIconInfo &stitchedData);
   181     bool IconInfoFromSingleIcon(HbIconKey key, HbSharedIconInfo &stitchedData, const QString & format);
   183     bool CreateCacheItemData(HbIconKey key, int options, HbSharedIconInfo &data,
   182     bool CreateCacheItemData(HbIconKey key, int options, HbSharedIconInfo &data,
   184                              bool isMultiPiece = false);
   183                              bool isMultiPiece = false);
   185     bool CreateStichedIconInfoOfParts(QVector<HbSharedIconInfo> dataForParts,
   184     bool CreateStichedIconInfoOfParts(QVector<HbSharedIconInfo> dataForParts,
   186                                       HbMultiIconParams params,
   185                                       HbMultiIconParams params,
   187                                       HbIconKey &finalIconKey,
   186                                       HbIconKey &finalIconKey,
   206     void PanicClient(const RMessage2 & aMessage, TInt aPanic) const;
   205     void PanicClient(const RMessage2 & aMessage, TInt aPanic) const;
   207 
   206 
   208 private:
   207 private:
   209     HbThemeServerPrivate *iServer;
   208     HbThemeServerPrivate *iServer;
   210     QList<HbIconKey> sessionData;
   209     QList<HbIconKey> sessionData;
   211     QList<QString> sessionCssData;
       
   212 };
   210 };
   213 
   211 
   214 #endif // HBTHEMESERVER_SYMBIAN_P_H
   212 #endif // HBTHEMESERVER_SYMBIAN_P_H