graphicstest/uibench/src/textendedbitmap.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) 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 TEXTENDEDBITMAP_H
#define TEXTENDEDBITMAP_H

#include "te_graphicsperformanceSuiteStepBase.h"
#include <graphics/fbsrasterizer.h>

const TInt KBitmapWidth = 128;
const TInt KBitmapHeight = 128;
const TSize KBitmapSize(KBitmapWidth,KBitmapHeight);

/** Class used to measure performance of extended bitmaps. 
Please note that all tests in this class (apart from CreateExtendedBitmapL()) 
are currently set to measure the performance of the test example rasterizer 
(found in graphics\fbserv\trasterizer\). Users that wish to measure the
performance of a different rasterizer must at least change the Uid of the 
extended bitmaps on test to one supported by the extended bitmap rasterizer
to be tested (see KExtendedBitmapUid).
 */
class CTExtendedBitmap : public CTe_graphicsperformanceSuiteStepBase
	{
public:
	CTExtendedBitmap();
	~CTExtendedBitmap();

private:			
	// From CTestStep
	virtual TVerdict doTestStepL();
	virtual TVerdict doTestStepPreambleL(); 	
	
	// Test steps
	void CreateExtendedBitmapL();	
	void DeleteExtendedBitmapL();
	void GetScanlinePreRenderedExtendedBitmapL();
	void GetScanlineNonPreRenderedExtendedBitmapL();
	void BitBltExtendedBitmapL();
	void BitBltNormalBitmapL();
	void DrawBitmapExtendedBitmapL();
	void DrawBitmapNormalBitmapL();
	void GetPixelL(TBool aIsExtendedBmp);

private:	
	// Helper functions for setting up tests and cleaning up afterwards
	void InitializeL();
	void CleanUpL();		
		
	CFbsRasterizer* iRasterizer;
	
	CFbsBitmap* iExtendedBmp;
	TUint8* iExtendedBmpData;
	TInt iExtendedBmpDataSize;
	
	CFbsBitmap* iNormalBmp;	
	CFbsBitmap* iTargetBmp;	
	CFbsBitmapDevice* iBitmapDevice;
	CFbsBitGc* iBitGc;	
	};

_LIT(KTExtendedBitmap,"textendedbitmap");

#endif // TEXTENDEDBITMAP_H