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