graphicsdeviceinterface/bitgdi/tbit/TAccelerator.h
author William Roberts <williamr@symbian.org>
Thu, 03 Jun 2010 17:39:46 +0100
branchNewGraphicsArchitecture
changeset 87 0709f76d91e5
parent 0 5d03bc08d59c
permissions -rw-r--r--
Add MMP files to build libOpenVG_sw.lib which uses LINKAS to redirect to libOpenVG.dll (and the same for libEGL_sw.lib and libOpenVGU_sw.lib). Only the libEGL_sw.lib redirection isn't activated - this can't happen until there is a merged libEGL.dll which supports the OpenWF synchronisation and also implements the graphical support functions. The overall aim is to eliminate the *_sw.dll implementations, at least as a compile-time way of choosing a software-only implementation.The correct way to choose is to put the right set of libraries into a ROM with suitable renaming, and in the emulator to use the "switching DLL" technique to pick the right set. As the Symbian Foundation doesn't have any alternative implementations, we don't need the switching DLLs and we can build directly to the correct name.

// Copyright (c) 2000-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:
//

#if !defined(__TACCELERATOR_H__)
#define __TACCELERATOR_H__

#include <bitdev.h>
#include "TBMP.H"
#include "TGraphicsHarness.h"

class CTestBitmap
	{
public:
	inline CTestBitmap() : iBitmap(0), iDevice(0), iGc(0) {};
	~CTestBitmap();
	TInt ConstructL(TDisplayMode aDisplayMode,TSize aSize,TBool aHWBitmap=EFalse);
	TInt ConstructL();
	void Reset();
	TBool Compare(CTestBitmap* aBitmap2);
public:
	CFbsBitmap*			iBitmap;
	CFbsBitmapDevice*	iDevice;
	CFbsBitGc*			iGc;
	};

class CTAccelerator : public CTGraphicsBase
	{
public:
	CTAccelerator(CTestStep* aStep);
	void Test();
protected:
//from 	CTGraphicsStep
	virtual void RunTestCaseL(TInt aCurTestCase);
private:
	void TestL();
	void Cleanup();
	TInt Random(TInt aMax);
	// Tests
	void TestAcceleratedBitmapSpecL(TDisplayMode aDisplayMode,TBool aHWBitmap);
	void TestGraphicsOperations(TDisplayMode aDisplayMode,TBool aHWBitmap);
	void TestGraphicsOperationsWithScreenL(TDisplayMode aDisplayMode,TBool aHWBitmap);
	void TestAcceleratorInfo();
	void TestAcceleratorInfoForExtendedBitmapL();
	void TestFilledRect();
    void TestFilledRectWithPattern();
    void TestInvertRect();
    void TestFadeRect();
    void TestBitBlt();
    void TestBitBltMasked();
	void TestBitBltAlphaBitmap();
	void TestAlphaBlendTwoBitmaps();
	void TestAlphaBlendOneBitmap();
	void resetColorBitmaps();

	void TestScreenFilledRect();
	void TestScreenFilledRectWithPattern();
	void TestScreenInvertRect();
	void TestScreenFadeRect();
	void TestScreenBitBlt();
	void TestScreenBitBltMasked();
	void TestScreenBitBltAlphaBitmap();
	void TestScreenAlphaBlendTwoBitmaps();
	void TestScreenAlphaBlendOneBitmap();
	void TestScreenRotation();
	void TestUserDisplayMode();

	TRegionFix<41> iFixedRegion;
	const TRegion* iFixedRegionPtr;
	TRegionFix<95> iSubRegion;
	const TRegion* iSubRegionPtr;
	TRegionFix<1> iDefaultRegion;
	TRegionFix<1> iDefaultScreenRegion;
private:
	TUint					iRandomSeed;
	CTestBitmap				iBitmap1;
	CTestBitmap				iBitmap2;
	CTestBitmap				iBitmap3;
	CTestBitmap				iBitmap4;
	CTestBitmap				iBitmap5;
	CTestBitmap				iBitmap6;
	CTestBitmap				iBitmap7;
	CTestBitmap				iBitmap8;
	CTestBitmap				iTileBitmap;
	CTestBitmap				iAlphaBitmap;
	CGraphicsAccelerator*	iGraphicsAccelerator1;
	CGraphicsAccelerator*	iGraphicsAccelerator2;
	TBitmapLockCount		iBitmapLockCount;
	CFbsScreenDevice*		iHwScreenDevice;
	CFbsBitGc*				iScreenGc;
	};

class CTAcceleratorStep : public CTGraphicsStep
	{
public:
	CTAcceleratorStep();
protected:	
	//from CTGraphicsStep
	virtual CTGraphicsBase* CreateTestL();
	virtual void TestSetupL();
	virtual void TestClose();
	};

_LIT(KTAcceleratorStep,"TAccelerator");


#endif