graphicstest/uibench/src/talphadrawing.h
changeset 0 5d03bc08d59c
equal deleted inserted replaced
-1:000000000000 0:5d03bc08d59c
       
     1 // Copyright (c) 2005-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 __GRAPHICSPERFORMANCEALPHADRAWING_H__
       
    23 #define __GRAPHICSPERFORMANCEALPHADRAWING_H__
       
    24 
       
    25 #include "te_graphicsperformanceSuiteStepBase.h"
       
    26 #include <w32std.h>
       
    27 
       
    28 class CTAlphaDrawing : public CTe_graphicsperformanceSuiteStepBase
       
    29 	{
       
    30 public:
       
    31 	CTAlphaDrawing();
       
    32 	~CTAlphaDrawing();
       
    33 	
       
    34 private:
       
    35 	enum TTestCase
       
    36 		{
       
    37 		EUseOpaqueDraw,
       
    38 		EUseTransparencyFactor,
       
    39 		};
       
    40 
       
    41 	void TestDrawWindowL(TDisplayMode aMode, TInt aIters, TTestCase aTestCase, const TDesC& aTestName);
       
    42 	void DrawBlankWindowL (RWindow& aForeGndWin, TInt aIters);
       
    43 	
       
    44 	void DoTestDrawOpaqueWindowL(TDisplayMode aMode, TInt aIters);
       
    45 	void DoTestDrawTransparentWindowFactorL(TDisplayMode aMode, TInt aIters);
       
    46 	void DoTestDrawTransparentWindowBitmapL(TDisplayMode aMode, TInt aIters);
       
    47 	void DoTestDrawTransparentWindowAlphaChannelL(TDisplayMode aMode, TInt aIters);
       
    48 	void DoTestCreateWindowL(TDisplayMode aMode, TInt aIters);
       
    49 	
       
    50 	TInt CyclesPerPixel(TInt64 aDuration, TInt aIters, TInt aWidth, TInt aHeight, TInt aCPUSpeed);
       
    51 	
       
    52 	// From CStepStep
       
    53 	virtual TVerdict doTestStepPreambleL();
       
    54 	virtual TVerdict doTestStepL();
       
    55 	
       
    56 private:
       
    57 									
       
    58 	RWsSession 			iWsSession;
       
    59 	RWindowGroup 		iWinGroup;
       
    60 	RWindow				iBackgndWindow;
       
    61 
       
    62 	CFbsBitmap*			iSourceImage;
       
    63 	
       
    64 	CWsScreenDevice* 	iScreenDevice;
       
    65 	CWindowGc* 			iWindowGc;
       
    66 	
       
    67 	CFbsBitGc::TGraphicsOrientation	iRotation;
       
    68 
       
    69 	TInt				iScreenMode;
       
    70 	TInt				iCPUSpeed;	
       
    71 	TInt64 				iDuration;
       
    72 	};
       
    73 
       
    74 _LIT(KTAlphaDrawing,"talphadrawing");
       
    75 
       
    76 #endif //__GRAPHICSPERFORMANCEALPHADRAWING_H__