First public contribution.
1 // Copyright (c) 2003-2010 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 #ifndef __TDEFECT2_H__
17 #define __TDEFECT2_H__
20 #include "TGraphicsHarness.h"
24 //The main test class. Add your test methods here.
25 class CTDefect2 : public CTGraphicsBase
28 CTDefect2(CTestStep* aStep);
33 virtual void RunTestCaseL(TInt aCurTestCase);
39 void ExerciseCopyRect();
40 TBool CopyRectReadOutsideBitmap(TInt aSingleMode =0,TInt aRetriesLeft =10);
42 void GetPixelPerformance1L();
43 void RotateMoveTextL();
44 void SwapWidthAndHeightL();
46 void DoRotateMoveTextL();
47 void CreateScrDevAndContextL();
48 TInt CreateScrDevAndContext(TDisplayMode aDisplayMode);
49 TInt CreateScrDevAndContext(TInt aScreenNo, TDisplayMode aDisplayMode);
50 void DeleteScreenDevice();
51 void DeleteGraphicsContext();
52 void CreateBitmapL(const TSize& aSize, TDisplayMode aMode);
54 void DeleteBitmapDevice();
57 void NonZeroOriginClearL();
59 void TestDirtyMaskBitmapL();
60 void ZeroSizedPatternBrushL();
61 void CFbsBitGcInternalizeLFailL();
62 void PixelsToTwipsConversionCheck();
63 void CopyRectAlphaL();
65 void TestMaskForAllCombinationL(TInt aChannelControl);
66 void TestMaskForSelectedValuesL(TInt aChannelControl);
67 void DoMaskTestL(TInt aSrcChannel, TInt aSrcMask, TInt aTargetMask, TInt aTargetChannel, TInt aChannelControl, CFbsBitmap* aSrcBmp, CFbsBitmap* aMaskBmp, CFbsBitmap* aTargetBmp, CBitmapContext* aTargetBmpContext);
68 void CheckValues(TUint aAlphaPixelValue, TUint aChannelPixelValue, TInt& aFailsPerPass, TInt aTargetMask, TInt aTargetChannel, TInt aSrcMask, TInt aSrcChannel, TInt aOtherMask, TUint* aReadPixel);
69 void LogColourEvent(TInt aPreMulDestPixColor,TInt aNonPreMulDestPixColor,TInt aPreMulSrcPixelColor,TInt aNonPreMulSrcPixelColor,TReal aVal1,TReal aVal2,TReal aVal3,TRefByValue<const TDesC> aMsg,TBool aErr);
72 CFbsScreenDevice* iScrDev;
75 TDisplayMode iCurrentMode;
77 CFbsBitmapDevice* iBmpDevice;
80 class CTDefect2Step : public CTGraphicsStep
86 virtual CTGraphicsBase* CreateTestL();
87 virtual void TestSetupL();
88 virtual void TestClose();
91 _LIT(KTDefect2Step,"TDefect2");