Update contrib.
2 * Copyright (c) 2007-2009 Nokia Corporation and/or its subsidiary(-ies).
4 * This component and the accompanying materials are made available
5 * under the terms of "Eclipse Public License v1.0"
6 * which accompanies this distribution, and is available
7 * at the URL "http://www.eclipse.org/legal/epl-v10.html".
9 * Initial Contributors:
10 * Nokia Corporation - initial contribution.
23 #include <graphics/shapeimpl.h>
25 const TInt KMaxShaperSesssionCacheMemory = 64*1024;
27 //class to store the handle the handle-reference count
31 THandleCount(TInt aSessionHandle)
32 :iSessionHandle(aSessionHandle),iRefCount(1),iNext(NULL){}
39 /******************** SHAPER CACHE CLASSES*************************************/
40 class COpenFontShaperCacheEntry: public CBase
43 static COpenFontShaperCacheEntry* New(RHeap* aHeap, CShaper::TInput aInput, TShapeHeader* aShapeHeader);
44 static COpenFontShaperCacheEntry* New(RHeap* aHeap);
45 static void Delete (RHeap* aHeap, COpenFontShaperCacheEntry* aCache);
46 TBool IsSentinel(){return iShapeHeader==NULL;}
47 TInt IncRefCount(TInt aSessionHandle);
48 TInt DecRefCount(TInt aSessionHandle,TBool aReset=EFalse);
50 COpenFontShaperCacheEntry(RHeap* aHeap,CShaper::TInput aInput)
51 :iStart(aInput.iStart),iEnd(aInput.iEnd),iScript(aInput.iScript), iHeap(aHeap){}
52 COpenFontShaperCacheEntry(){}
53 TInt Construct(CShaper::TInput aInput,TShapeHeader* aShapeHeader);
55 COpenFontShaperCacheEntry* iPrevious; // pointer to previous node in tree
56 COpenFontShaperCacheEntry* iNext; // pointer to next shaping info node in the list
58 /** The shaped information that is cached */
59 TShapeHeader* iShapeHeader;
60 /** Input information */
65 /** pointer to a private heap for allocating the handle-refcount array*/
67 /** linked list of THandleCount to store the handle-refcount information */
68 THandleCount* iHandleRefList;
72 /***********************SHAPER CACHE ENDS HERE********************************/