Update contrib.
1 // Copyright (c) 2005-2010 Nokia Corporation and/or its subsidiary(-ies).
2 // All rights reserved.
3 // This component and the accompanying materials are made available
4 // under the terms of "Eclipse Public License v1.0"
5 // which accompanies this distribution, and is available
6 // at the URL "http://www.eclipse.org/legal/epl-v10.html".
8 // Initial Contributors:
9 // Nokia Corporation - initial contribution.
14 // fbsfonthandleperf.h
21 @internalComponent - Internal Symbian test code
24 #ifndef __TFBSFONTHANDLEPERF_H__
25 #define __TFBSFONTHANDLEPERF_H__
27 #include "te_graphicsperformanceSuiteStepBase.h"
28 #include <test/ttmsgraphicsstep.h>
29 #include <graphics/openfontrasterizer.h>
31 //******** CDummyFontFile **********//
33 class CDummyFontFile: public COpenFontFile
36 static CDummyFontFile* NewL(TInt aUid,const TDesC& aFileName);
38 CDummyFontFile(TInt aUid,const TDesC& aFileName);
41 void GetNearestFontInPixelsL(RHeap* aHeap,COpenFontSessionCacheList* aSessionCacheList,
42 const TOpenFontSpec& aDesiredFontSpec,TInt aPixelWidth,TInt aPixelHeight,
43 COpenFont*& aFont,TOpenFontSpec& aActualFontSpec);
44 TBool HasUnicodeCharacterL(TInt /*aFaceIndex*/,TInt /*aCode*/) const;
50 //********** CDummyRasterizer **********//
52 class CDummyRasterizer: public COpenFontRasterizer
55 static CDummyRasterizer* NewL();
56 // virtual function from COpenFontRasterizer
57 COpenFontFile* NewFontFileL(TInt aUid,const TDesC& aFileName,RFs& aFileSession);
60 //*********** CDummy Font **********************//
61 class CDummyFont: public COpenFont
64 static CDummyFont* NewL(RHeap* aHeap,COpenFontSessionCacheList* aSessionCacheList,CDummyFontFile* aFontFile,TInt aSizeInPixels);
66 CDummyFont(RHeap* aHeap,COpenFontSessionCacheList* aSessionCacheList,CDummyFontFile* aFontFile,TInt aSizeInPixels);
68 virtual void RasterizeL(TInt aCode,TOpenFontGlyphData* aGlyphData);
69 inline void operator delete (TAny *){} //to avoid warning
70 inline void operator delete (TAny *, TAny* ){} //to avoid warning
74 class CTFbsFontHandlePerf : public CTe_graphicsperformanceSuiteStepBase
77 CTFbsFontHandlePerf();
80 void FontDuplicateL();
81 void FontGetNearestFontToDesignHeightInPixelsL(const TDesC& aFontName, const TDesC& aTestName);
82 void AddAndRemoveFilesL(TBool aTestOpenFont);
83 void DoAddAndRemoveFilesL(TBool aTestOpenFont, CFontStore* aFontStore);
84 void AddingOpenedFontFilesL(TBool aTestOpenFont);
85 void FontDrawTextGlyphCacheL(const TDesC& aFontName, const TDesC& aTestName, const TDesC& aOutputText);
86 void FontDrawStringWithoutGlyphCacheL(const TDesC& aFontName, const TDesC& aTestName, TInt aFontHeight,const TDesC& aOutputString);
88 void NonAliasedFontCreationL();
89 void AliasedFontCreationL();
90 void FontCreationPerformanceL(CFbsTypefaceStore* aTs, const TDesC& aFontName, const TDesC& aTestDescription);
93 virtual TVerdict doTestStepPreambleL();
94 virtual TVerdict doTestStepL();
97 CBitmapDevice* iDevice;
100 _LIT(KTFbsFontHandlePerfName,"tfbsfonthandleperf");