Update contrib.
1 // Copyright (c) 2004-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".
8 // Initial Contributors:
9 // Nokia Corporation - initial contribution.
16 //This file contains test bitmap file names for TDefect test app.
22 #include "TGraphicsHarness.h"
24 //The next enum is used by 16 bpp and 24 bpp bitmap compression tests.
30 //New enum members - insert them here
35 //The main test class. Add your test methods here.
36 class CTDefect : public CTGraphicsBase
39 typedef enum {EScalingAllowed, EScalingNotAllowed} TAllowScaling;
41 CTDefect(CTestStep* aStep);
46 virtual void RunTestCaseL(TInt aCurTestCase);
49 void CreateScreenDeviceL(TAllowScaling aScaling = EScalingAllowed);
50 TInt CreateScreenDeviceL(TDisplayMode aDisplayMode, TAllowScaling aScaling = EScalingAllowed);
55 void BitmapCompressionL(TBitmapType aBitmapType);
57 void INC031920L(TBitmapType aBitmapType, TBool aRomBitmap);
58 void Test8bitBmpComressionL();
59 void Test12bitBmpComressionL();
60 void ZeroSizeBitmap();
62 void TestTilingHorizontalAndVerticalL();
63 void DrawPieBorderlineCasesL();
67 CFbsBitGcBitmap* LoadBitmapLC(const TDesC& aFileName);
68 void TestSettingDisplayModeL();
69 void TestSettingDisplayMode2L();
70 void SetAndCheckDisplayMode(TDisplayMode aMode, const TSize& aInitialSize);
72 void TestSwappingWidthAndHeightL();
75 void TestBitBltOperationsOn16muUndefinedByteL();
76 void ExternalizeInternalizeCFbsBitGCExtraData();
79 void DeleteBitmapDevice();
80 void DeleteScreenDevice();
81 void DeleteGraphicsContext();
83 void DisplayBitmapL(const TDesC& aFileName, TInt aBitmapNo, TInt aBitmapOffset, const TDesC& aText, const TRect&);
84 void DisplayBitmap(const TDesC& aText, const TRect&);
85 void DisplayBitmap(const TRect&, TDisplayMode aScreenMode, TDisplayMode aBmpMode);
90 void DrawPie(const TDesC& aText, const TRect& aRc, const TPoint& aPtStart, const TPoint& aPtEnd);
91 void CreateBitmapL(const TSize& aSize, TDisplayMode aMode);
94 void BitmapsSwappingTest();
97 void CheckResults(CFbsDevice* aDevice, TInt aWidth, TInt aHeight, TInt aPattern, TInt aBarHeight);
98 void InitialiseSourceAndMaskLC(CFbsBitmap*& aSrc, TDisplayMode aSrcDispMode, CFbsBitmap*& aMask, TDisplayMode aMaskDispMode, TSize aPicSize, TInt aNumMaskBars, TInt aMaskBarHeight, TSize* aMaskSize=NULL);
99 void TestDoBltMaskedL(TDisplayMode aSrcDispMode, TDisplayMode aMaskDispMode, TDisplayMode aDeviceDispMode, TSize aPicSize, TBool aUseScreenDevice, TBool aInvertMask, TSize* aMaskSize=NULL);
100 TUint32 Color(const TRgb& aColor, const TDisplayMode& aDisplayMode);
101 void TestDoBitBltMaskedSizeL();
102 void TestBitBltMaskedEColor16MUL();
103 void CheckBitmapContents(CFbsDevice* aDevice, TInt aWidth, TInt aHeight, TUint32 aExpectedValue);
104 TUint32 AlphaBlendWithDestAlphaFF(const TUint32 aSrcPixel, const TUint8 aMask, TUint32 aDestPixel);
105 void TestClippedScaledBitmapL();
106 void TestDrawBitmapTwipsNotSet();
107 void TestDoDrawBitmapMaskedL(TDisplayMode aSrcDispMode, TDisplayMode aMaskDispMode, TDisplayMode aDeviceDispMode, TSize aPicSize, TSize* aMaskSize=NULL);
108 void TestDrawBitmapMaskedL();
111 CFbsScreenDevice* iDevice;
112 CFbsBitmapDevice* iBmpDevice;
116 TDisplayMode iCurrentMode;
117 TBool iSkipRomBitmapTests;
120 class CTDefectStep : public CTGraphicsStep
125 //from CTGraphicsStep
126 virtual CTGraphicsBase* CreateTestL();
127 virtual void TestSetupL();
128 virtual void TestClose();
131 _LIT(KTDefectStep,"TDefect");
134 #endif//__TDEFECT_H__