Update contrib.
1 // Copyright (c) 2000-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".
8 // Initial Contributors:
9 // Nokia Corporation - initial contribution.
16 #if !defined(__TACCELERATOR_H__)
17 #define __TACCELERATOR_H__
21 #include "TGraphicsHarness.h"
26 inline CTestBitmap() : iBitmap(0), iDevice(0), iGc(0) {};
28 TInt ConstructL(TDisplayMode aDisplayMode,TSize aSize,TBool aHWBitmap=EFalse);
31 TBool Compare(CTestBitmap* aBitmap2);
34 CFbsBitmapDevice* iDevice;
38 class CTAccelerator : public CTGraphicsBase
41 CTAccelerator(CTestStep* aStep);
45 virtual void RunTestCaseL(TInt aCurTestCase);
49 TInt Random(TInt aMax);
51 void TestAcceleratedBitmapSpecL(TDisplayMode aDisplayMode,TBool aHWBitmap);
52 void TestGraphicsOperations(TDisplayMode aDisplayMode,TBool aHWBitmap);
53 void TestGraphicsOperationsWithScreenL(TDisplayMode aDisplayMode,TBool aHWBitmap);
54 void TestAcceleratorInfo();
55 void TestAcceleratorInfoForExtendedBitmapL();
56 void TestFilledRect();
57 void TestFilledRectWithPattern();
58 void TestInvertRect();
61 void TestBitBltMasked();
62 void TestBitBltAlphaBitmap();
63 void TestAlphaBlendTwoBitmaps();
64 void TestAlphaBlendOneBitmap();
65 void resetColorBitmaps();
67 void TestScreenFilledRect();
68 void TestScreenFilledRectWithPattern();
69 void TestScreenInvertRect();
70 void TestScreenFadeRect();
71 void TestScreenBitBlt();
72 void TestScreenBitBltMasked();
73 void TestScreenBitBltAlphaBitmap();
74 void TestScreenAlphaBlendTwoBitmaps();
75 void TestScreenAlphaBlendOneBitmap();
76 void TestScreenRotation();
77 void TestUserDisplayMode();
79 TRegionFix<41> iFixedRegion;
80 const TRegion* iFixedRegionPtr;
81 TRegionFix<95> iSubRegion;
82 const TRegion* iSubRegionPtr;
83 TRegionFix<1> iDefaultRegion;
84 TRegionFix<1> iDefaultScreenRegion;
95 CTestBitmap iTileBitmap;
96 CTestBitmap iAlphaBitmap;
97 CGraphicsAccelerator* iGraphicsAccelerator1;
98 CGraphicsAccelerator* iGraphicsAccelerator2;
99 TBitmapLockCount iBitmapLockCount;
100 CFbsScreenDevice* iHwScreenDevice;
101 CFbsBitGc* iScreenGc;
104 class CTAcceleratorStep : public CTGraphicsStep
109 //from CTGraphicsStep
110 virtual CTGraphicsBase* CreateTestL();
111 virtual void TestSetupL();
112 virtual void TestClose();
115 _LIT(KTAcceleratorStep,"TAccelerator");