os/graphics/graphicsdeviceinterface/bitgdi/tbit/TAccelerator.h
author sl@SLION-WIN7.fritz.box
Fri, 15 Jun 2012 03:10:57 +0200
changeset 0 bde4ae8d615e
permissions -rw-r--r--
First public contribution.
     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".
     7 //
     8 // Initial Contributors:
     9 // Nokia Corporation - initial contribution.
    10 //
    11 // Contributors:
    12 //
    13 // Description:
    14 //
    15 
    16 #if !defined(__TACCELERATOR_H__)
    17 #define __TACCELERATOR_H__
    18 
    19 #include <bitdev.h>
    20 #include "TBMP.H"
    21 #include "TGraphicsHarness.h"
    22 
    23 class CTestBitmap
    24 	{
    25 public:
    26 	inline CTestBitmap() : iBitmap(0), iDevice(0), iGc(0) {};
    27 	~CTestBitmap();
    28 	TInt ConstructL(TDisplayMode aDisplayMode,TSize aSize,TBool aHWBitmap=EFalse);
    29 	TInt ConstructL();
    30 	void Reset();
    31 	TBool Compare(CTestBitmap* aBitmap2);
    32 public:
    33 	CFbsBitmap*			iBitmap;
    34 	CFbsBitmapDevice*	iDevice;
    35 	CFbsBitGc*			iGc;
    36 	};
    37 
    38 class CTAccelerator : public CTGraphicsBase
    39 	{
    40 public:
    41 	CTAccelerator(CTestStep* aStep);
    42 	void Test();
    43 protected:
    44 //from 	CTGraphicsStep
    45 	virtual void RunTestCaseL(TInt aCurTestCase);
    46 private:
    47 	void TestL();
    48 	void Cleanup();
    49 	TInt Random(TInt aMax);
    50 	// Tests
    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();
    59     void TestFadeRect();
    60     void TestBitBlt();
    61     void TestBitBltMasked();
    62 	void TestBitBltAlphaBitmap();
    63 	void TestAlphaBlendTwoBitmaps();
    64 	void TestAlphaBlendOneBitmap();
    65 	void resetColorBitmaps();
    66 
    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();
    78 
    79 	TRegionFix<41> iFixedRegion;
    80 	const TRegion* iFixedRegionPtr;
    81 	TRegionFix<95> iSubRegion;
    82 	const TRegion* iSubRegionPtr;
    83 	TRegionFix<1> iDefaultRegion;
    84 	TRegionFix<1> iDefaultScreenRegion;
    85 private:
    86 	TUint					iRandomSeed;
    87 	CTestBitmap				iBitmap1;
    88 	CTestBitmap				iBitmap2;
    89 	CTestBitmap				iBitmap3;
    90 	CTestBitmap				iBitmap4;
    91 	CTestBitmap				iBitmap5;
    92 	CTestBitmap				iBitmap6;
    93 	CTestBitmap				iBitmap7;
    94 	CTestBitmap				iBitmap8;
    95 	CTestBitmap				iTileBitmap;
    96 	CTestBitmap				iAlphaBitmap;
    97 	CGraphicsAccelerator*	iGraphicsAccelerator1;
    98 	CGraphicsAccelerator*	iGraphicsAccelerator2;
    99 	TBitmapLockCount		iBitmapLockCount;
   100 	CFbsScreenDevice*		iHwScreenDevice;
   101 	CFbsBitGc*				iScreenGc;
   102 	};
   103 
   104 class CTAcceleratorStep : public CTGraphicsStep
   105 	{
   106 public:
   107 	CTAcceleratorStep();
   108 protected:	
   109 	//from CTGraphicsStep
   110 	virtual CTGraphicsBase* CreateTestL();
   111 	virtual void TestSetupL();
   112 	virtual void TestClose();
   113 	};
   114 
   115 _LIT(KTAcceleratorStep,"TAccelerator");
   116 
   117 
   118 #endif
   119