fontservices/fontstore/inc/openfontsprivate.h
changeset 57 01e38b33e72a
parent 51 a7c938434754
equal deleted inserted replaced
51:a7c938434754 57:01e38b33e72a
   133 	inline const COpenFont* Font()const;
   133 	inline const COpenFont* Font()const;
   134 
   134 
   135 private:
   135 private:
   136 	inline COpenFontSessionCacheEntry(const COpenFont* aFont, TInt aCode, TInt aGlyphIndex, const TOpenFontCharMetrics& aMetrics);
   136 	inline COpenFontSessionCacheEntry(const COpenFont* aFont, TInt aCode, TInt aGlyphIndex, const TOpenFontCharMetrics& aMetrics);
   137 	~COpenFontSessionCacheEntry();
   137 	~COpenFontSessionCacheEntry();
   138 public:
       
   139     TInt iLastAccess;               // serial number of the last access to the glyph
       
   140 
   138 
   141 private: 
   139 private: 
   142     TInt iFontOffset;          // offset of the font that contains this glyph, (not owned by this class!)    
   140     TInt iFontOffset;          // offset of the font that contains this glyph, (not owned by this class!)    
   143 	};
   141 	};
   144 
   142 
   148 
   146 
   149  @internalComponent
   147  @internalComponent
   150  */
   148  */
   151 class COpenFontSessionCache
   149 class COpenFontSessionCache
   152     {
   150     {
       
   151 	friend class COpenFontSessionCacheList;
   153 public:
   152 public:
   154     static COpenFontSessionCache* NewL(RHeap* aHeap, TInt aSessionHandle, TInt aEntries);
   153     static COpenFontSessionCache* NewL(RHeap* aHeap, TInt aSessionHandle, TInt aEntries);
   155     void Delete(RHeap* aHeap);
   154     void Delete(RHeap* aHeap);
   156     
   155     
   157     TInt SessionHandle() { return iSessionHandle; }
   156     TInt SessionHandle() { return iSessionHandle; }
   158     const COpenFontGlyph* Glyph(const COpenFont* aFont, TInt aCode, TInt& aIndex);
   157     const COpenFontGlyph* Glyph(const COpenFont* aFont, TInt aCode, TInt& aIndex) const;
   159     void Insert(RHeap* aHeap, COpenFontSessionCacheEntry* aEntry, TInt aIndex);
   158     void Insert(RHeap* aHeap, COpenFontSessionCacheEntry* aEntry, TInt aIndex);
   160     
   159     
   161 private:
   160 private:
   162     COpenFontSessionCache(TInt aSessionHandle);
   161     COpenFontSessionCache(TInt aSessionHandle);
   163     ~COpenFontSessionCache();
   162     ~COpenFontSessionCache();
   164 public:
   163 private:
   165     TInt iSessionHandle;    
   164     TInt iSessionHandle;
   166     TInt iLastAccess;
   165     TInt64 iRandomSeed;
   167     ROffsetArray<COpenFontSessionCacheEntry> iEntryArray;
   166     ROffsetArray<COpenFontSessionCacheEntry> iEntryArray;
   168     };
   167     };
   169 
   168 
   170 
   169 
   171 class TFontTableGlyphOutlineCacheMemMonitor
   170 class TFontTableGlyphOutlineCacheMemMonitor