sl@0: // Copyright (c) 2000-2009 Nokia Corporation and/or its subsidiary(-ies). sl@0: // All rights reserved. sl@0: // This component and the accompanying materials are made available sl@0: // under the terms of "Eclipse Public License v1.0" sl@0: // which accompanies this distribution, and is available sl@0: // at the URL "http://www.eclipse.org/legal/epl-v10.html". sl@0: // sl@0: // Initial Contributors: sl@0: // Nokia Corporation - initial contribution. sl@0: // sl@0: // Contributors: sl@0: // sl@0: // Description: sl@0: // sl@0: sl@0: #if !defined(__TACCELERATOR_H__) sl@0: #define __TACCELERATOR_H__ sl@0: sl@0: #include sl@0: #include "TBMP.H" sl@0: #include "TGraphicsHarness.h" sl@0: sl@0: class CTestBitmap sl@0: { sl@0: public: sl@0: inline CTestBitmap() : iBitmap(0), iDevice(0), iGc(0) {}; sl@0: ~CTestBitmap(); sl@0: TInt ConstructL(TDisplayMode aDisplayMode,TSize aSize,TBool aHWBitmap=EFalse); sl@0: TInt ConstructL(); sl@0: void Reset(); sl@0: TBool Compare(CTestBitmap* aBitmap2); sl@0: public: sl@0: CFbsBitmap* iBitmap; sl@0: CFbsBitmapDevice* iDevice; sl@0: CFbsBitGc* iGc; sl@0: }; sl@0: sl@0: class CTAccelerator : public CTGraphicsBase sl@0: { sl@0: public: sl@0: CTAccelerator(CTestStep* aStep); sl@0: void Test(); sl@0: protected: sl@0: //from CTGraphicsStep sl@0: virtual void RunTestCaseL(TInt aCurTestCase); sl@0: private: sl@0: void TestL(); sl@0: void Cleanup(); sl@0: TInt Random(TInt aMax); sl@0: // Tests sl@0: void TestAcceleratedBitmapSpecL(TDisplayMode aDisplayMode,TBool aHWBitmap); sl@0: void TestGraphicsOperations(TDisplayMode aDisplayMode,TBool aHWBitmap); sl@0: void TestGraphicsOperationsWithScreenL(TDisplayMode aDisplayMode,TBool aHWBitmap); sl@0: void TestAcceleratorInfo(); sl@0: void TestAcceleratorInfoForExtendedBitmapL(); sl@0: void TestFilledRect(); sl@0: void TestFilledRectWithPattern(); sl@0: void TestInvertRect(); sl@0: void TestFadeRect(); sl@0: void TestBitBlt(); sl@0: void TestBitBltMasked(); sl@0: void TestBitBltAlphaBitmap(); sl@0: void TestAlphaBlendTwoBitmaps(); sl@0: void TestAlphaBlendOneBitmap(); sl@0: void resetColorBitmaps(); sl@0: sl@0: void TestScreenFilledRect(); sl@0: void TestScreenFilledRectWithPattern(); sl@0: void TestScreenInvertRect(); sl@0: void TestScreenFadeRect(); sl@0: void TestScreenBitBlt(); sl@0: void TestScreenBitBltMasked(); sl@0: void TestScreenBitBltAlphaBitmap(); sl@0: void TestScreenAlphaBlendTwoBitmaps(); sl@0: void TestScreenAlphaBlendOneBitmap(); sl@0: void TestScreenRotation(); sl@0: void TestUserDisplayMode(); sl@0: sl@0: TRegionFix<41> iFixedRegion; sl@0: const TRegion* iFixedRegionPtr; sl@0: TRegionFix<95> iSubRegion; sl@0: const TRegion* iSubRegionPtr; sl@0: TRegionFix<1> iDefaultRegion; sl@0: TRegionFix<1> iDefaultScreenRegion; sl@0: private: sl@0: TUint iRandomSeed; sl@0: CTestBitmap iBitmap1; sl@0: CTestBitmap iBitmap2; sl@0: CTestBitmap iBitmap3; sl@0: CTestBitmap iBitmap4; sl@0: CTestBitmap iBitmap5; sl@0: CTestBitmap iBitmap6; sl@0: CTestBitmap iBitmap7; sl@0: CTestBitmap iBitmap8; sl@0: CTestBitmap iTileBitmap; sl@0: CTestBitmap iAlphaBitmap; sl@0: CGraphicsAccelerator* iGraphicsAccelerator1; sl@0: CGraphicsAccelerator* iGraphicsAccelerator2; sl@0: TBitmapLockCount iBitmapLockCount; sl@0: CFbsScreenDevice* iHwScreenDevice; sl@0: CFbsBitGc* iScreenGc; sl@0: }; sl@0: sl@0: class CTAcceleratorStep : public CTGraphicsStep sl@0: { sl@0: public: sl@0: CTAcceleratorStep(); sl@0: protected: sl@0: //from CTGraphicsStep sl@0: virtual CTGraphicsBase* CreateTestL(); sl@0: virtual void TestSetupL(); sl@0: virtual void TestClose(); sl@0: }; sl@0: sl@0: _LIT(KTAcceleratorStep,"TAccelerator"); sl@0: sl@0: sl@0: #endif sl@0: