os/graphics/graphicsdeviceinterface/bitgdi/tbit/TDefect2.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) 2003-2010 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
#ifndef __TDEFECT2_H__
sl@0
    17
#define __TDEFECT2_H__
sl@0
    18
sl@0
    19
#include <bitdev.h>
sl@0
    20
#include "TGraphicsHarness.h"
sl@0
    21
sl@0
    22
//
sl@0
    23
//
sl@0
    24
//The main test class. Add your test methods here.
sl@0
    25
class CTDefect2 : public CTGraphicsBase
sl@0
    26
	{
sl@0
    27
public:
sl@0
    28
	CTDefect2(CTestStep* aStep);
sl@0
    29
	~CTDefect2();
sl@0
    30
	void TestL();
sl@0
    31
protected:
sl@0
    32
//from 	CTGraphicsStep
sl@0
    33
	virtual void RunTestCaseL(TInt aCurTestCase);
sl@0
    34
	void ConstructL();
sl@0
    35
private:
sl@0
    36
	void DEF039237L();
sl@0
    37
	void DEF039331L();
sl@0
    38
	void DEF039650L();
sl@0
    39
	void ExerciseCopyRect();
sl@0
    40
	TBool CopyRectReadOutsideBitmap(TInt aSingleMode =0,TInt aRetriesLeft =10);
sl@0
    41
	
sl@0
    42
	void GetPixelPerformance1L();
sl@0
    43
	void RotateMoveTextL();
sl@0
    44
	void SwapWidthAndHeightL();
sl@0
    45
sl@0
    46
	void DoRotateMoveTextL();
sl@0
    47
	void CreateScrDevAndContextL();
sl@0
    48
	TInt CreateScrDevAndContext(TDisplayMode aDisplayMode);
sl@0
    49
	TInt CreateScrDevAndContext(TInt aScreenNo, TDisplayMode aDisplayMode);
sl@0
    50
	void DeleteScreenDevice();
sl@0
    51
	void DeleteGraphicsContext();
sl@0
    52
	void CreateBitmapL(const TSize& aSize, TDisplayMode aMode);
sl@0
    53
	void DeleteBitmap();
sl@0
    54
	void DeleteBitmapDevice();
sl@0
    55
	void CreateFontL();
sl@0
    56
	void DestroyFont();
sl@0
    57
	void NonZeroOriginClearL();
sl@0
    58
	void DEF115395L();
sl@0
    59
	void TestDirtyMaskBitmapL();
sl@0
    60
	void ZeroSizedPatternBrushL();
sl@0
    61
	void CFbsBitGcInternalizeLFailL();
sl@0
    62
	void PixelsToTwipsConversionCheck();
sl@0
    63
	void CopyRectAlphaL();
sl@0
    64
	void TestSetBitsL();
sl@0
    65
    void TestMaskForAllCombinationL(TInt aChannelControl);
sl@0
    66
    void TestMaskForSelectedValuesL(TInt aChannelControl);
sl@0
    67
    void DoMaskTestL(TInt aSrcChannel, TInt aSrcMask, TInt aTargetMask, TInt aTargetChannel, TInt aChannelControl, CFbsBitmap* aSrcBmp, CFbsBitmap* aMaskBmp, CFbsBitmap* aTargetBmp, CBitmapContext* aTargetBmpContext);
sl@0
    68
    void CheckValues(TUint aAlphaPixelValue, TUint aChannelPixelValue, TInt& aFailsPerPass, TInt aTargetMask, TInt aTargetChannel, TInt aSrcMask, TInt aSrcChannel, TInt aOtherMask, TUint* aReadPixel);
sl@0
    69
    void LogColourEvent(TInt aPreMulDestPixColor,TInt aNonPreMulDestPixColor,TInt aPreMulSrcPixelColor,TInt aNonPreMulSrcPixelColor,TReal aVal1,TReal aVal2,TReal aVal3,TRefByValue<const TDesC> aMsg,TBool aErr);
sl@0
    70
sl@0
    71
private:
sl@0
    72
	CFbsScreenDevice* iScrDev;
sl@0
    73
	CFbsBitGc* iGc;
sl@0
    74
	TSize iSize;
sl@0
    75
	TDisplayMode iCurrentMode;	
sl@0
    76
	CFbsBitmap* iBitmap;
sl@0
    77
	CFbsBitmapDevice* iBmpDevice;
sl@0
    78
	};
sl@0
    79
sl@0
    80
class CTDefect2Step : public CTGraphicsStep
sl@0
    81
	{
sl@0
    82
public:
sl@0
    83
	CTDefect2Step();
sl@0
    84
protected:	
sl@0
    85
	//from CTGraphicsStep
sl@0
    86
	virtual CTGraphicsBase* CreateTestL();
sl@0
    87
	virtual void TestSetupL();
sl@0
    88
	virtual void TestClose();
sl@0
    89
	};
sl@0
    90
sl@0
    91
_LIT(KTDefect2Step,"TDefect2");
sl@0
    92
sl@0
    93
#endif