|
1 // Copyright (c)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". |
|
7 // |
|
8 // Initial Contributors: |
|
9 // Nokia Corporation - initial contribution. |
|
10 // |
|
11 // Contributors: |
|
12 // |
|
13 // Description: |
|
14 // tfbsfontrasterizeperf.h |
|
15 // |
|
16 // |
|
17 |
|
18 /** |
|
19 @file |
|
20 @test |
|
21 @internalComponent - Internal test code |
|
22 */ |
|
23 |
|
24 #ifndef __TFBSFONTRASTERIZEPERF_H__ |
|
25 #define __TFBSFONTRASTERIZEPERF_H__ |
|
26 |
|
27 #include "te_graphicsperformanceSuiteStepBase.h" |
|
28 #include <test/ttmsgraphicsstep.h> |
|
29 #include <graphics/openfontrasterizer.h> |
|
30 |
|
31 class CTFbsFontRasterizePerf : public CTe_graphicsperformanceSuiteStepBase |
|
32 { |
|
33 public: |
|
34 CTFbsFontRasterizePerf(); |
|
35 |
|
36 private: |
|
37 class TCacheTestParam |
|
38 { |
|
39 public: |
|
40 enum TLang |
|
41 { |
|
42 ELatin, |
|
43 EChinese |
|
44 }; |
|
45 static const TPtrC KLangText[]; |
|
46 |
|
47 TInt iHeight; |
|
48 TGlyphBitmapType iGlyphBitmapType; |
|
49 TLang iLang; |
|
50 const TDesC& iText; |
|
51 TInt iFrom; |
|
52 TInt iTo; |
|
53 }; |
|
54 |
|
55 void GlyphCacheNotFullL(); |
|
56 void GlyphCacheFullLSessionCacheNotFullL(); |
|
57 void GlyphCacheFullLSessionCacheFullL(); |
|
58 void DoCacheTestL(CFbsTypefaceStore* aTs, const TCacheTestParam& aParam, const TDesC& aTestName); |
|
59 void TestItypeRasterizeL(); |
|
60 void DoTestItypeRasterizeL(RHeap* aHeap, const TCacheTestParam& aParam, TOpenFontGlyphData* aGlyphData); |
|
61 void TestLoadFontsAtStartupL(); |
|
62 |
|
63 struct TMultiThreadPara |
|
64 { |
|
65 // Input parameters |
|
66 TFontSpec * iSpec; |
|
67 TPtrC iFileName; |
|
68 |
|
69 // WriteBack parameters |
|
70 TUint32 iTimeMax; |
|
71 TUint32 iTimeMin; |
|
72 TUint32 iMean; |
|
73 TUint32 iIters; |
|
74 }; |
|
75 |
|
76 void FontGetCharacterDataMultiSessionL(); |
|
77 void DoFontGetCharacterDataMultiSessionL(TFontSpec& aFontSpec); |
|
78 |
|
79 static TInt FontGetCharacterDataThread(TAny *); |
|
80 static void FontGetCharacterDataWorkerL(TMultiThreadPara *aPara); |
|
81 |
|
82 // From CStepStep |
|
83 virtual TVerdict doTestStepPreambleL(); |
|
84 virtual TVerdict doTestStepL(); |
|
85 }; |
|
86 |
|
87 _LIT(KTFbsFontRasterizePerfName,"tfbsfontrasterizeperf"); |
|
88 |
|
89 #endif |