graphicstest/uibench/src/tfbsfontrasterizeperf.h
changeset 194 18f84489a694
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/graphicstest/uibench/src/tfbsfontrasterizeperf.h	Mon Oct 04 02:31:51 2010 +0300
@@ -0,0 +1,89 @@
+// Copyright (c)2010 Nokia Corporation and/or its subsidiary(-ies).
+// All rights reserved.
+// This component and the accompanying materials are made available
+// under the terms of "Eclipse Public License v1.0"
+// which accompanies this distribution, and is available
+// at the URL "http://www.eclipse.org/legal/epl-v10.html".
+//
+// Initial Contributors:
+// Nokia Corporation - initial contribution.
+//
+// Contributors:
+//
+// Description:
+// tfbsfontrasterizeperf.h
+// 
+//
+
+/**
+ @file
+ @test
+ @internalComponent - Internal test code 
+*/
+ 
+#ifndef __TFBSFONTRASTERIZEPERF_H__
+#define __TFBSFONTRASTERIZEPERF_H__
+
+#include "te_graphicsperformanceSuiteStepBase.h"
+#include <test/ttmsgraphicsstep.h>
+#include <graphics/openfontrasterizer.h>
+
+class CTFbsFontRasterizePerf : public CTe_graphicsperformanceSuiteStepBase
+	{
+public:
+    CTFbsFontRasterizePerf();
+	
+private:
+    class TCacheTestParam
+        {
+    public:
+        enum TLang
+            {
+            ELatin,
+            EChinese
+            };
+        static const TPtrC KLangText[];
+        
+        TInt iHeight;
+        TGlyphBitmapType iGlyphBitmapType;
+        TLang iLang;
+        const TDesC& iText;
+        TInt iFrom;
+        TInt iTo;
+        };
+   
+	void GlyphCacheNotFullL();
+	void GlyphCacheFullLSessionCacheNotFullL();
+	void GlyphCacheFullLSessionCacheFullL();
+    void DoCacheTestL(CFbsTypefaceStore* aTs, const TCacheTestParam& aParam, const TDesC& aTestName);    
+    void TestItypeRasterizeL();
+    void DoTestItypeRasterizeL(RHeap* aHeap, const TCacheTestParam& aParam, TOpenFontGlyphData* aGlyphData);
+    void TestLoadFontsAtStartupL();
+
+    struct TMultiThreadPara
+        {
+        // Input parameters
+        TFontSpec * iSpec;
+        TPtrC       iFileName; 
+        
+        // WriteBack parameters
+        TUint32     iTimeMax;
+        TUint32     iTimeMin;
+        TUint32     iMean;
+        TUint32     iIters;
+        };
+
+    void FontGetCharacterDataMultiSessionL();
+    void DoFontGetCharacterDataMultiSessionL(TFontSpec& aFontSpec);
+    
+    static TInt FontGetCharacterDataThread(TAny *);
+    static void FontGetCharacterDataWorkerL(TMultiThreadPara *aPara);
+    
+	// From CStepStep
+	virtual TVerdict doTestStepPreambleL();
+	virtual TVerdict doTestStepL();
+	};
+	
+_LIT(KTFbsFontRasterizePerfName,"tfbsfontrasterizeperf");
+
+#endif