graphicstest/uibench/src/textendedbitmap.h
changeset 0 5d03bc08d59c
equal deleted inserted replaced
-1:000000000000 0:5d03bc08d59c
       
     1 // Copyright (c) 2008-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 TEXTENDEDBITMAP_H
       
    23 #define TEXTENDEDBITMAP_H
       
    24 
       
    25 #include "te_graphicsperformanceSuiteStepBase.h"
       
    26 #include <graphics/fbsrasterizer.h>
       
    27 
       
    28 const TInt KBitmapWidth = 128;
       
    29 const TInt KBitmapHeight = 128;
       
    30 const TSize KBitmapSize(KBitmapWidth,KBitmapHeight);
       
    31 
       
    32 /** Class used to measure performance of extended bitmaps. 
       
    33 Please note that all tests in this class (apart from CreateExtendedBitmapL()) 
       
    34 are currently set to measure the performance of the test example rasterizer 
       
    35 (found in graphics\fbserv\trasterizer\). Users that wish to measure the
       
    36 performance of a different rasterizer must at least change the Uid of the 
       
    37 extended bitmaps on test to one supported by the extended bitmap rasterizer
       
    38 to be tested (see KExtendedBitmapUid).
       
    39  */
       
    40 class CTExtendedBitmap : public CTe_graphicsperformanceSuiteStepBase
       
    41 	{
       
    42 public:
       
    43 	CTExtendedBitmap();
       
    44 	~CTExtendedBitmap();
       
    45 
       
    46 private:			
       
    47 	// From CTestStep
       
    48 	virtual TVerdict doTestStepL();
       
    49 	virtual TVerdict doTestStepPreambleL(); 	
       
    50 	
       
    51 	// Test steps
       
    52 	void CreateExtendedBitmapL();	
       
    53 	void DeleteExtendedBitmapL();
       
    54 	void GetScanlinePreRenderedExtendedBitmapL();
       
    55 	void GetScanlineNonPreRenderedExtendedBitmapL();
       
    56 	void BitBltExtendedBitmapL();
       
    57 	void BitBltNormalBitmapL();
       
    58 	void DrawBitmapExtendedBitmapL();
       
    59 	void DrawBitmapNormalBitmapL();
       
    60 	void GetPixelL(TBool aIsExtendedBmp);
       
    61 
       
    62 private:	
       
    63 	// Helper functions for setting up tests and cleaning up afterwards
       
    64 	void InitializeL();
       
    65 	void CleanUpL();		
       
    66 		
       
    67 	CFbsRasterizer* iRasterizer;
       
    68 	
       
    69 	CFbsBitmap* iExtendedBmp;
       
    70 	TUint8* iExtendedBmpData;
       
    71 	TInt iExtendedBmpDataSize;
       
    72 	
       
    73 	CFbsBitmap* iNormalBmp;	
       
    74 	CFbsBitmap* iTargetBmp;	
       
    75 	CFbsBitmapDevice* iBitmapDevice;
       
    76 	CFbsBitGc* iBitGc;	
       
    77 	};
       
    78 
       
    79 _LIT(KTExtendedBitmap,"textendedbitmap");
       
    80 
       
    81 #endif // TEXTENDEDBITMAP_H