uigraphics/AknIcon/SvgtFbsRasterizer/inc/SvgtFbsRasterizer.h
changeset 81 92450c1e1512
parent 2 abcbdabaa4c5
equal deleted inserted replaced
53:8f0f421d3d0f 81:92450c1e1512
    19 #define SVGTFBSRASTERIZER_H
    19 #define SVGTFBSRASTERIZER_H
    20 
    20 
    21 #include "SvgtRegisteredBitmap.h"
    21 #include "SvgtRegisteredBitmap.h"
    22 #include "svgtgraphicsinterface.h"
    22 #include "svgtgraphicsinterface.h"
    23 #include <graphics/fbsrasterizer.h>
    23 #include <graphics/fbsrasterizer.h>
       
    24 #include <graphics/fbsrasterizerclearcache.h>
       
    25 #include "SvgtRasterizerCacheLimitHandler.h"
       
    26 
    24 #include <e32base.h>
    27 #include <e32base.h>
    25 #include <VG/openvg.h>
    28 #include <VG/openvg.h>
    26 
    29 
    27 const TUid KUidNvgProprietaryFormat = { 968435518 };
    30 const TUid KUidNvgProprietaryFormat = { 968435518 };
    28 const TInt KMaxRecentBmpCacheSize = 0x40000;
    31 const TInt KMaxRecentBmpCacheSize = 0x40000;
    34 class CNvgEngine;
    37 class CNvgEngine;
    35 class TAknIconHeader;
    38 class TAknIconHeader;
    36 
    39 
    37 TBool operator==(const CFbsRasterizer::TBitmapDesc& aBitmapDesc1, const CFbsRasterizer::TBitmapDesc& aBitmapDesc2);
    40 TBool operator==(const CFbsRasterizer::TBitmapDesc& aBitmapDesc1, const CFbsRasterizer::TBitmapDesc& aBitmapDesc2);
    38 
    41 
       
    42 class CSvgtRasterizerOOMPropertyMonitor;
    39 
    43 
    40 /** Example implementation of a rasterizer that is used to generate pixel
    44 /** Example implementation of a rasterizer that is used to generate pixel
    41 data for extended bitmaps of example type KUidExtendedBitmapExample. 
    45 data for extended bitmaps of example type KUidExtendedBitmapExample. 
    42  */
    46  */
    43 NONSHARABLE_CLASS (CSvgtFbsRasterizer) : public CFbsRasterizer
    47 NONSHARABLE_CLASS (CSvgtFbsRasterizer) : public CFbsRasterizer, 
       
    48                                             public MFbsRasterizerClearCache,
       
    49                                             public MSvgtRasterizerCacheLimitHandler
    44     {
    50     {
    45 public:
    51 public:
    46     IMPORT_C static CFbsRasterizer* New();
    52     IMPORT_C static CFbsRasterizer* New();
    47     ~CSvgtFbsRasterizer();
    53     ~CSvgtFbsRasterizer();
    48     
    54     
    98     TInt MapOpenVgErrorCodeToSymbian(TInt aErrorCode);
   104     TInt MapOpenVgErrorCodeToSymbian(TInt aErrorCode);
    99     /*
   105     /*
   100      * Returns cache limit (if) specific to process
   106      * Returns cache limit (if) specific to process
   101      */
   107      */
   102     TInt GetCacheLimit(TUid aProcessUID) const;
   108     TInt GetCacheLimit(TUid aProcessUID) const;
       
   109 
       
   110     //From MFbsRasterizerClearCache
       
   111     virtual void ClearCache();
       
   112     
       
   113     //from MSvgtRasterizerCacheLimitHandler
       
   114     virtual void ChangeCacheLimit( TBool aChangeCacheLimit );
       
   115 
   103 private: //Data members
   116 private: //Data members
   104     /** List of currently registered extended bitmaps, the key is the bitmap id.
   117     /** List of currently registered extended bitmaps, the key is the bitmap id.
   105      */
   118      */
   106     TDblQue<CSvgtRegisteredBitmap> iRegisteredBmps;
   119     TDblQue<CSvgtRegisteredBitmap> iRegisteredBmps;
   107     /** List of recently used extended bitmaps, the key is the bitmap id.
   120     /** List of recently used extended bitmaps, the key is the bitmap id.
   112     TInt iTotalRecentBmpSize;
   125     TInt iTotalRecentBmpSize;
   113     /** An idle-time active object to clean up the recently used extended bitmaps.
   126     /** An idle-time active object to clean up the recently used extended bitmaps.
   114      */
   127      */
   115     
   128     
   116     CSvgtGraphicsInterface * iGraphicsInterface;
   129     CSvgtGraphicsInterface * iGraphicsInterface;
       
   130     CSvgtRasterizerOOMPropertyMonitor* iMonitor;
   117          
   131          
   118     TBool iIsRasterizerValidState;
   132     TBool iIsRasterizerValidState;
   119     TBool iMatricesUpdated;
   133     TBool iMatricesUpdated;
   120     CNvgEngine* iNvgEngine;
   134     CNvgEngine* iNvgEngine;
   121     
   135