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.
sl@0
     1
// Copyright (c) 2000-2009 Nokia Corporation and/or its subsidiary(-ies).
sl@0
     2
// All rights reserved.
sl@0
     3
// This component and the accompanying materials are made available
sl@0
     4
// under the terms of "Eclipse Public License v1.0"
sl@0
     5
// which accompanies this distribution, and is available
sl@0
     6
// at the URL "http://www.eclipse.org/legal/epl-v10.html".
sl@0
     7
//
sl@0
     8
// Initial Contributors:
sl@0
     9
// Nokia Corporation - initial contribution.
sl@0
    10
//
sl@0
    11
// Contributors:
sl@0
    12
//
sl@0
    13
// Description:
sl@0
    14
//
sl@0
    15
sl@0
    16
#if !defined(__TACCELERATOR_H__)
sl@0
    17
#define __TACCELERATOR_H__
sl@0
    18
sl@0
    19
#include <bitdev.h>
sl@0
    20
#include "TBMP.H"
sl@0
    21
#include "TGraphicsHarness.h"
sl@0
    22
sl@0
    23
class CTestBitmap
sl@0
    24
	{
sl@0
    25
public:
sl@0
    26
	inline CTestBitmap() : iBitmap(0), iDevice(0), iGc(0) {};
sl@0
    27
	~CTestBitmap();
sl@0
    28
	TInt ConstructL(TDisplayMode aDisplayMode,TSize aSize,TBool aHWBitmap=EFalse);
sl@0
    29
	TInt ConstructL();
sl@0
    30
	void Reset();
sl@0
    31
	TBool Compare(CTestBitmap* aBitmap2);
sl@0
    32
public:
sl@0
    33
	CFbsBitmap*			iBitmap;
sl@0
    34
	CFbsBitmapDevice*	iDevice;
sl@0
    35
	CFbsBitGc*			iGc;
sl@0
    36
	};
sl@0
    37
sl@0
    38
class CTAccelerator : public CTGraphicsBase
sl@0
    39
	{
sl@0
    40
public:
sl@0
    41
	CTAccelerator(CTestStep* aStep);
sl@0
    42
	void Test();
sl@0
    43
protected:
sl@0
    44
//from 	CTGraphicsStep
sl@0
    45
	virtual void RunTestCaseL(TInt aCurTestCase);
sl@0
    46
private:
sl@0
    47
	void TestL();
sl@0
    48
	void Cleanup();
sl@0
    49
	TInt Random(TInt aMax);
sl@0
    50
	// Tests
sl@0
    51
	void TestAcceleratedBitmapSpecL(TDisplayMode aDisplayMode,TBool aHWBitmap);
sl@0
    52
	void TestGraphicsOperations(TDisplayMode aDisplayMode,TBool aHWBitmap);
sl@0
    53
	void TestGraphicsOperationsWithScreenL(TDisplayMode aDisplayMode,TBool aHWBitmap);
sl@0
    54
	void TestAcceleratorInfo();
sl@0
    55
	void TestAcceleratorInfoForExtendedBitmapL();
sl@0
    56
	void TestFilledRect();
sl@0
    57
    void TestFilledRectWithPattern();
sl@0
    58
    void TestInvertRect();
sl@0
    59
    void TestFadeRect();
sl@0
    60
    void TestBitBlt();
sl@0
    61
    void TestBitBltMasked();
sl@0
    62
	void TestBitBltAlphaBitmap();
sl@0
    63
	void TestAlphaBlendTwoBitmaps();
sl@0
    64
	void TestAlphaBlendOneBitmap();
sl@0
    65
	void resetColorBitmaps();
sl@0
    66
sl@0
    67
	void TestScreenFilledRect();
sl@0
    68
	void TestScreenFilledRectWithPattern();
sl@0
    69
	void TestScreenInvertRect();
sl@0
    70
	void TestScreenFadeRect();
sl@0
    71
	void TestScreenBitBlt();
sl@0
    72
	void TestScreenBitBltMasked();
sl@0
    73
	void TestScreenBitBltAlphaBitmap();
sl@0
    74
	void TestScreenAlphaBlendTwoBitmaps();
sl@0
    75
	void TestScreenAlphaBlendOneBitmap();
sl@0
    76
	void TestScreenRotation();
sl@0
    77
	void TestUserDisplayMode();
sl@0
    78
sl@0
    79
	TRegionFix<41> iFixedRegion;
sl@0
    80
	const TRegion* iFixedRegionPtr;
sl@0
    81
	TRegionFix<95> iSubRegion;
sl@0
    82
	const TRegion* iSubRegionPtr;
sl@0
    83
	TRegionFix<1> iDefaultRegion;
sl@0
    84
	TRegionFix<1> iDefaultScreenRegion;
sl@0
    85
private:
sl@0
    86
	TUint					iRandomSeed;
sl@0
    87
	CTestBitmap				iBitmap1;
sl@0
    88
	CTestBitmap				iBitmap2;
sl@0
    89
	CTestBitmap				iBitmap3;
sl@0
    90
	CTestBitmap				iBitmap4;
sl@0
    91
	CTestBitmap				iBitmap5;
sl@0
    92
	CTestBitmap				iBitmap6;
sl@0
    93
	CTestBitmap				iBitmap7;
sl@0
    94
	CTestBitmap				iBitmap8;
sl@0
    95
	CTestBitmap				iTileBitmap;
sl@0
    96
	CTestBitmap				iAlphaBitmap;
sl@0
    97
	CGraphicsAccelerator*	iGraphicsAccelerator1;
sl@0
    98
	CGraphicsAccelerator*	iGraphicsAccelerator2;
sl@0
    99
	TBitmapLockCount		iBitmapLockCount;
sl@0
   100
	CFbsScreenDevice*		iHwScreenDevice;
sl@0
   101
	CFbsBitGc*				iScreenGc;
sl@0
   102
	};
sl@0
   103
sl@0
   104
class CTAcceleratorStep : public CTGraphicsStep
sl@0
   105
	{
sl@0
   106
public:
sl@0
   107
	CTAcceleratorStep();
sl@0
   108
protected:	
sl@0
   109
	//from CTGraphicsStep
sl@0
   110
	virtual CTGraphicsBase* CreateTestL();
sl@0
   111
	virtual void TestSetupL();
sl@0
   112
	virtual void TestClose();
sl@0
   113
	};
sl@0
   114
sl@0
   115
_LIT(KTAcceleratorStep,"TAccelerator");
sl@0
   116
sl@0
   117
sl@0
   118
#endif
sl@0
   119