graphicstest/graphicstestharness/inc/tprofiler.h
author Matt Plumtree <matt.plumtree@nokia.com>
Fri, 23 Apr 2010 17:57:02 +0100
branchNewGraphicsArchitecture
changeset 39 a4b63488e0b0
parent 0 5d03bc08d59c
child 36 01a6848ebfd7
child 163 bbf46f59e123
permissions -rw-r--r--
Revise some of the compositor performance improvements to improve correctness. Implement pixel blending using a variation of Jim Blinn's no-division blending algorithm. Move transparency type simplification further up the composition code. Remove some unnecessary fields. Output to YUV implementation needs revision as it is actually converting from YUV (copy of source conversion code).

// Copyright (c) 2008-2009 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:
//

/**
 @file
 @test
 @internalComponent - Internal Symbian test code 
*/

#ifndef __TPROFILER_H__
#define __TPROFILER_H__

#include <e32base.h>
#include <test/tefexportconst.h>

class CTestStep;


class CTProfiler : public CBase
    {
public:
    IMPORT_C static CTProfiler* NewL(CTestStep& aTestStep);
    IMPORT_C ~CTProfiler();
    IMPORT_C void StartTimer();
    IMPORT_C TInt64 StopTimer();
    IMPORT_C void InitResults();
    IMPORT_C void MarkResultSetL();
    IMPORT_C TUint32 GetTrimedMean();
    IMPORT_C TUint32 Mean();
    IMPORT_C TInt PercentageChange(TInt aFirstTime, TInt aSecondTime);
    IMPORT_C void ResultsAnalysis(const TDesC & aTestName, TInt aRotation, TInt aSrcScreenMode, TInt aDstScreenMode, TInt aIters);
    IMPORT_C void ResultsAnalysisPixelRate(const TDesC & aTestName, TInt aRotation, TInt aSrcScreenMode, TInt aDstScreenMode, TInt aIters, TInt aNumPixels);
    IMPORT_C void ResultsAnalysisCharacterRate(const TDesC & aTestName, TInt aRotation, TInt aSrcScreenMode, TInt aDstScreenMode, TInt aIters, TInt aNumPixels);
    IMPORT_C void ResultsAnalysisAverageByIterations(const TDesC & aTestName, TInt aRotation, TInt aSrcScreenMode, TInt aDstScreenMode, TInt aIters);
    IMPORT_C void ResultsAnalysisAverageByNumberOfIterations(const TDesC& aTestName, TInt aRotation, TInt aSrcScreenMode, TInt aDstScreenMode, TInt aIters);
    IMPORT_C void ResultsAnalysisFrameRate(const TDesC & aTestName, TInt aRotation, TInt aSrcScreenMode, TInt aDstScreenMode, TInt aIters, TInt aNumPixels);
    IMPORT_C void ResultsAnalysisScreenRotationRate(const TDesC & aTestName, TInt aRotation, TInt aSrcScreenMode, TInt aDstScreenMode, TInt aIters, TInt aNumPixels);
    IMPORT_C void ResultsAnalysisZorderSwitchingRate(const TDesC & aTestName, TInt aZorderSwitching, TInt aSrcScreenMode, TInt aDstScreenMode, TInt aIters, TInt aNumPixels);
	IMPORT_C void FreeResultsMemory();

private:
    CTProfiler(CTestStep& aTestStep);
    void ConstructL();
    TUint32 TimeMax();
    TUint32 TimeMin();
private:
    TUint32             iStart;
    TUint32             iEnd;
    TUint32             iDiff;
    TInt                iFreq;  
    RArray<TUint32>     iResults;
    TBool               iResultsInitalised;
    CTestStep&          iTestStep;
    };

#endif