os/graphics/graphicsdeviceinterface/bitgdi/tbit/TAccelerator.h
changeset 0 bde4ae8d615e
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/os/graphics/graphicsdeviceinterface/bitgdi/tbit/TAccelerator.h	Fri Jun 15 03:10:57 2012 +0200
     1.3 @@ -0,0 +1,119 @@
     1.4 +// Copyright (c) 2000-2009 Nokia Corporation and/or its subsidiary(-ies).
     1.5 +// All rights reserved.
     1.6 +// This component and the accompanying materials are made available
     1.7 +// under the terms of "Eclipse Public License v1.0"
     1.8 +// which accompanies this distribution, and is available
     1.9 +// at the URL "http://www.eclipse.org/legal/epl-v10.html".
    1.10 +//
    1.11 +// Initial Contributors:
    1.12 +// Nokia Corporation - initial contribution.
    1.13 +//
    1.14 +// Contributors:
    1.15 +//
    1.16 +// Description:
    1.17 +//
    1.18 +
    1.19 +#if !defined(__TACCELERATOR_H__)
    1.20 +#define __TACCELERATOR_H__
    1.21 +
    1.22 +#include <bitdev.h>
    1.23 +#include "TBMP.H"
    1.24 +#include "TGraphicsHarness.h"
    1.25 +
    1.26 +class CTestBitmap
    1.27 +	{
    1.28 +public:
    1.29 +	inline CTestBitmap() : iBitmap(0), iDevice(0), iGc(0) {};
    1.30 +	~CTestBitmap();
    1.31 +	TInt ConstructL(TDisplayMode aDisplayMode,TSize aSize,TBool aHWBitmap=EFalse);
    1.32 +	TInt ConstructL();
    1.33 +	void Reset();
    1.34 +	TBool Compare(CTestBitmap* aBitmap2);
    1.35 +public:
    1.36 +	CFbsBitmap*			iBitmap;
    1.37 +	CFbsBitmapDevice*	iDevice;
    1.38 +	CFbsBitGc*			iGc;
    1.39 +	};
    1.40 +
    1.41 +class CTAccelerator : public CTGraphicsBase
    1.42 +	{
    1.43 +public:
    1.44 +	CTAccelerator(CTestStep* aStep);
    1.45 +	void Test();
    1.46 +protected:
    1.47 +//from 	CTGraphicsStep
    1.48 +	virtual void RunTestCaseL(TInt aCurTestCase);
    1.49 +private:
    1.50 +	void TestL();
    1.51 +	void Cleanup();
    1.52 +	TInt Random(TInt aMax);
    1.53 +	// Tests
    1.54 +	void TestAcceleratedBitmapSpecL(TDisplayMode aDisplayMode,TBool aHWBitmap);
    1.55 +	void TestGraphicsOperations(TDisplayMode aDisplayMode,TBool aHWBitmap);
    1.56 +	void TestGraphicsOperationsWithScreenL(TDisplayMode aDisplayMode,TBool aHWBitmap);
    1.57 +	void TestAcceleratorInfo();
    1.58 +	void TestAcceleratorInfoForExtendedBitmapL();
    1.59 +	void TestFilledRect();
    1.60 +    void TestFilledRectWithPattern();
    1.61 +    void TestInvertRect();
    1.62 +    void TestFadeRect();
    1.63 +    void TestBitBlt();
    1.64 +    void TestBitBltMasked();
    1.65 +	void TestBitBltAlphaBitmap();
    1.66 +	void TestAlphaBlendTwoBitmaps();
    1.67 +	void TestAlphaBlendOneBitmap();
    1.68 +	void resetColorBitmaps();
    1.69 +
    1.70 +	void TestScreenFilledRect();
    1.71 +	void TestScreenFilledRectWithPattern();
    1.72 +	void TestScreenInvertRect();
    1.73 +	void TestScreenFadeRect();
    1.74 +	void TestScreenBitBlt();
    1.75 +	void TestScreenBitBltMasked();
    1.76 +	void TestScreenBitBltAlphaBitmap();
    1.77 +	void TestScreenAlphaBlendTwoBitmaps();
    1.78 +	void TestScreenAlphaBlendOneBitmap();
    1.79 +	void TestScreenRotation();
    1.80 +	void TestUserDisplayMode();
    1.81 +
    1.82 +	TRegionFix<41> iFixedRegion;
    1.83 +	const TRegion* iFixedRegionPtr;
    1.84 +	TRegionFix<95> iSubRegion;
    1.85 +	const TRegion* iSubRegionPtr;
    1.86 +	TRegionFix<1> iDefaultRegion;
    1.87 +	TRegionFix<1> iDefaultScreenRegion;
    1.88 +private:
    1.89 +	TUint					iRandomSeed;
    1.90 +	CTestBitmap				iBitmap1;
    1.91 +	CTestBitmap				iBitmap2;
    1.92 +	CTestBitmap				iBitmap3;
    1.93 +	CTestBitmap				iBitmap4;
    1.94 +	CTestBitmap				iBitmap5;
    1.95 +	CTestBitmap				iBitmap6;
    1.96 +	CTestBitmap				iBitmap7;
    1.97 +	CTestBitmap				iBitmap8;
    1.98 +	CTestBitmap				iTileBitmap;
    1.99 +	CTestBitmap				iAlphaBitmap;
   1.100 +	CGraphicsAccelerator*	iGraphicsAccelerator1;
   1.101 +	CGraphicsAccelerator*	iGraphicsAccelerator2;
   1.102 +	TBitmapLockCount		iBitmapLockCount;
   1.103 +	CFbsScreenDevice*		iHwScreenDevice;
   1.104 +	CFbsBitGc*				iScreenGc;
   1.105 +	};
   1.106 +
   1.107 +class CTAcceleratorStep : public CTGraphicsStep
   1.108 +	{
   1.109 +public:
   1.110 +	CTAcceleratorStep();
   1.111 +protected:	
   1.112 +	//from CTGraphicsStep
   1.113 +	virtual CTGraphicsBase* CreateTestL();
   1.114 +	virtual void TestSetupL();
   1.115 +	virtual void TestClose();
   1.116 +	};
   1.117 +
   1.118 +_LIT(KTAcceleratorStep,"TAccelerator");
   1.119 +
   1.120 +
   1.121 +#endif
   1.122 +