// 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