graphicstest/uibench/src/tflipframerate.h
changeset 0 5d03bc08d59c
equal deleted inserted replaced
-1:000000000000 0:5d03bc08d59c
       
     1 // Copyright (c) 2009 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 //
       
    15 
       
    16 /**
       
    17  @file
       
    18  @test
       
    19  @internalComponent - Internal Symbian test code 
       
    20 */
       
    21 
       
    22 #ifndef TFLIPFRAMERATE_H
       
    23 #define TFLIPFRAMERATE_H
       
    24 
       
    25 #ifndef SYMBIAN_GRAPHICS_EGL_SGIMAGELITE
       
    26 #include <graphics/sgimagecollection.h>
       
    27 #include <graphics/sgimage.h>
       
    28 #endif
       
    29 #include <graphics/surfaceupdateclient.h>
       
    30 #include <graphics/surfaceconfiguration.h>
       
    31 #include "tdirectgditestbase.h"
       
    32 
       
    33 /**
       
    34 Test case to test the relative performance when a surface is rotated and/or flipped
       
    35 */
       
    36 class CTFlipFramerate : public CTDirectGdiTestBase
       
    37     {      
       
    38 private:
       
    39     enum TFlipped
       
    40         {
       
    41         ENotFlipped =EFalse,
       
    42         EFlipped =ETrue
       
    43         };
       
    44     enum TScreenSizeDivisors
       
    45         {        
       
    46         EScreensizeFull =1,
       
    47         EScreenSizeQuarter =2
       
    48         };    
       
    49     
       
    50     // From CTDirectGdiTestBase
       
    51 #ifndef SYMBIAN_GRAPHICS_EGL_SGIMAGELITE
       
    52     virtual TVerdict doTestStepPreambleL();
       
    53     virtual TVerdict doTestStepPostambleL();
       
    54 #endif
       
    55     virtual TVerdict doTestStepL();
       
    56     
       
    57     void RenderL();
       
    58     void GetFontL();
       
    59     void TestStepFramerateL(const TFlipped aIsFlipped,
       
    60                         const TScreenSizeDivisors aWindowSizeDivisor,
       
    61                         const TDesC& aStepName);
       
    62     void TestFramerateOrientationL(const TFlipped aIsFlipped,
       
    63                         const TScreenSizeDivisors aWindowSizeDivisor,
       
    64                         const CFbsBitGc::TGraphicsOrientation aOrientation);
       
    65     void SetSizeL(const TScreenSizeDivisors aWindowSizeDivisor);
       
    66     
       
    67 private:    
       
    68     RWsSession iWs;
       
    69     RWindowGroup iWinGroup;    
       
    70     RWindow iWindow;
       
    71     CWsScreenDevice* iScreenDev;
       
    72     RSurfaceUpdateSession iUpdateSession;
       
    73     TSize iSurfaceSize;
       
    74     TReal iTextPos;
       
    75 #ifndef SYMBIAN_GRAPHICS_EGL_SGIMAGELITE
       
    76     TSgImageInfo iImageInfo;
       
    77     RSgImageCollection iImgCol;
       
    78     RSgImage iImage;
       
    79 #endif
       
    80     TInt iTextPhraseLength;
       
    81     TReal iLastFrameTime;
       
    82     CFbsTypefaceStore* iTsStore;
       
    83     CFont* iFont;
       
    84     TTimeStamp iTimeStamp;
       
    85     TReal iTextPhraseSpeed;
       
    86     TSurfaceConfiguration iSurfaceConfiguration;    
       
    87     };
       
    88 
       
    89 _LIT(KTFlipFramerate,"tflipframerate");
       
    90 
       
    91 #endif /* TFLIPFRAMERATE_H */