graphicstest/uibench/src/tflipframerate.h
author Matt Plumtree <matt.plumtree@nokia.com>
Fri, 23 Apr 2010 17:57:02 +0100
branchNewGraphicsArchitecture
changeset 39 a4b63488e0b0
parent 0 5d03bc08d59c
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) 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 TFLIPFRAMERATE_H
#define TFLIPFRAMERATE_H

#ifndef SYMBIAN_GRAPHICS_EGL_SGIMAGELITE
#include <graphics/sgimagecollection.h>
#include <graphics/sgimage.h>
#endif
#include <graphics/surfaceupdateclient.h>
#include <graphics/surfaceconfiguration.h>
#include "tdirectgditestbase.h"

/**
Test case to test the relative performance when a surface is rotated and/or flipped
*/
class CTFlipFramerate : public CTDirectGdiTestBase
    {      
private:
    enum TFlipped
        {
        ENotFlipped =EFalse,
        EFlipped =ETrue
        };
    enum TScreenSizeDivisors
        {        
        EScreensizeFull =1,
        EScreenSizeQuarter =2
        };    
    
    // From CTDirectGdiTestBase
#ifndef SYMBIAN_GRAPHICS_EGL_SGIMAGELITE
    virtual TVerdict doTestStepPreambleL();
    virtual TVerdict doTestStepPostambleL();
#endif
    virtual TVerdict doTestStepL();
    
    void RenderL();
    void GetFontL();
    void TestStepFramerateL(const TFlipped aIsFlipped,
                        const TScreenSizeDivisors aWindowSizeDivisor,
                        const TDesC& aStepName);
    void TestFramerateOrientationL(const TFlipped aIsFlipped,
                        const TScreenSizeDivisors aWindowSizeDivisor,
                        const CFbsBitGc::TGraphicsOrientation aOrientation);
    void SetSizeL(const TScreenSizeDivisors aWindowSizeDivisor);
    
private:    
    RWsSession iWs;
    RWindowGroup iWinGroup;    
    RWindow iWindow;
    CWsScreenDevice* iScreenDev;
    RSurfaceUpdateSession iUpdateSession;
    TSize iSurfaceSize;
    TReal iTextPos;
#ifndef SYMBIAN_GRAPHICS_EGL_SGIMAGELITE
    TSgImageInfo iImageInfo;
    RSgImageCollection iImgCol;
    RSgImage iImage;
#endif
    TInt iTextPhraseLength;
    TReal iLastFrameTime;
    CFbsTypefaceStore* iTsStore;
    CFont* iFont;
    TTimeStamp iTimeStamp;
    TReal iTextPhraseSpeed;
    TSurfaceConfiguration iSurfaceConfiguration;    
    };

_LIT(KTFlipFramerate,"tflipframerate");

#endif /* TFLIPFRAMERATE_H */