sl@0: // Copyright (c) 2004-2009 Nokia Corporation and/or its subsidiary(-ies). sl@0: // All rights reserved. sl@0: // This component and the accompanying materials are made available sl@0: // under the terms of "Eclipse Public License v1.0" sl@0: // which accompanies this distribution, and is available sl@0: // at the URL "http://www.eclipse.org/legal/epl-v10.html". sl@0: // sl@0: // Initial Contributors: sl@0: // Nokia Corporation - initial contribution. sl@0: // sl@0: // Contributors: sl@0: // sl@0: // Description: sl@0: // sl@0: sl@0: //This file contains test bitmap file names for TDefect test app. sl@0: #ifndef __TDEFECT_H__ sl@0: #define __TDEFECT_H__ sl@0: sl@0: sl@0: #include sl@0: #include "TGraphicsHarness.h" sl@0: sl@0: //The next enum is used by 16 bpp and 24 bpp bitmap compression tests. sl@0: typedef enum sl@0: { sl@0: E16BppBmpType, sl@0: E24BppBmpType, sl@0: // sl@0: //New enum members - insert them here sl@0: // sl@0: ELastBmpType sl@0: } TBitmapType; sl@0: sl@0: //The main test class. Add your test methods here. sl@0: class CTDefect : public CTGraphicsBase sl@0: { sl@0: public: sl@0: typedef enum {EScalingAllowed, EScalingNotAllowed} TAllowScaling; sl@0: public: sl@0: CTDefect(CTestStep* aStep); sl@0: ~CTDefect(); sl@0: sl@0: protected: sl@0: //from CTGraphicsStep sl@0: virtual void RunTestCaseL(TInt aCurTestCase); sl@0: void ConstructL(); sl@0: private: sl@0: void CreateScreenDeviceL(TAllowScaling aScaling = EScalingAllowed); sl@0: TInt CreateScreenDeviceL(TDisplayMode aDisplayMode, TAllowScaling aScaling = EScalingAllowed); sl@0: void DEF014364L(); sl@0: void DEF017758(); sl@0: void DEF017758L(); sl@0: void DEF023605L(); sl@0: void BitmapCompressionL(TBitmapType aBitmapType); sl@0: void NewRscFormatL(); sl@0: void INC031920L(TBitmapType aBitmapType, TBool aRomBitmap); sl@0: void Test8bitBmpComressionL(); sl@0: void Test12bitBmpComressionL(); sl@0: void ZeroSizeBitmap(); sl@0: void DEF034134L(); sl@0: void TestTilingHorizontalAndVerticalL(); sl@0: void DrawPieBorderlineCasesL(); sl@0: void INC037380L(); sl@0: void INC037474L(); sl@0: void INC070043L(); sl@0: CFbsBitGcBitmap* LoadBitmapLC(const TDesC& aFileName); sl@0: void TestSettingDisplayModeL(); sl@0: void TestSettingDisplayMode2L(); sl@0: void SetAndCheckDisplayMode(TDisplayMode aMode, const TSize& aInitialSize); sl@0: void CheckScanLine(); sl@0: void TestSwappingWidthAndHeightL(); sl@0: void INC037370L(); sl@0: void DEF038774L(); sl@0: void TestBitBltOperationsOn16muUndefinedByteL(); sl@0: void ExternalizeInternalizeCFbsBitGCExtraData(); sl@0: sl@0: void DeleteBitmap(); sl@0: void DeleteBitmapDevice(); sl@0: void DeleteScreenDevice(); sl@0: void DeleteGraphicsContext(); sl@0: sl@0: void DisplayBitmapL(const TDesC& aFileName, TInt aBitmapNo, TInt aBitmapOffset, const TDesC& aText, const TRect&); sl@0: void DisplayBitmap(const TDesC& aText, const TRect&); sl@0: void DisplayBitmap(const TRect&, TDisplayMode aScreenMode, TDisplayMode aBmpMode); sl@0: sl@0: void CreateFontL(); sl@0: void DestroyFont(); sl@0: sl@0: void DrawPie(const TDesC& aText, const TRect& aRc, const TPoint& aPtStart, const TPoint& aPtEnd); sl@0: void CreateBitmapL(const TSize& aSize, TDisplayMode aMode); sl@0: void INC042156L(); sl@0: void TestOom(); sl@0: void BitmapsSwappingTest(); sl@0: void INC093055L(); sl@0: void PDEF103809L(); sl@0: void CheckResults(CFbsDevice* aDevice, TInt aWidth, TInt aHeight, TInt aPattern, TInt aBarHeight); sl@0: void InitialiseSourceAndMaskLC(CFbsBitmap*& aSrc, TDisplayMode aSrcDispMode, CFbsBitmap*& aMask, TDisplayMode aMaskDispMode, TSize aPicSize, TInt aNumMaskBars, TInt aMaskBarHeight, TSize* aMaskSize=NULL); sl@0: void TestDoBltMaskedL(TDisplayMode aSrcDispMode, TDisplayMode aMaskDispMode, TDisplayMode aDeviceDispMode, TSize aPicSize, TBool aUseScreenDevice, TBool aInvertMask, TSize* aMaskSize=NULL); sl@0: TUint32 Color(const TRgb& aColor, const TDisplayMode& aDisplayMode); sl@0: void TestDoBitBltMaskedSizeL(); sl@0: void TestBitBltMaskedEColor16MUL(); sl@0: void CheckBitmapContents(CFbsDevice* aDevice, TInt aWidth, TInt aHeight, TUint32 aExpectedValue); sl@0: TUint32 AlphaBlendWithDestAlphaFF(const TUint32 aSrcPixel, const TUint8 aMask, TUint32 aDestPixel); sl@0: void TestClippedScaledBitmapL(); sl@0: void TestDrawBitmapTwipsNotSet(); sl@0: void TestDoDrawBitmapMaskedL(TDisplayMode aSrcDispMode, TDisplayMode aMaskDispMode, TDisplayMode aDeviceDispMode, TSize aPicSize, TSize* aMaskSize=NULL); sl@0: void TestDrawBitmapMaskedL(); sl@0: sl@0: private: sl@0: CFbsScreenDevice* iDevice; sl@0: CFbsBitmapDevice* iBmpDevice; sl@0: CFbsBitGc* iGc; sl@0: CFbsBitmap* iBitmap; sl@0: TSize iSize; sl@0: TDisplayMode iCurrentMode; sl@0: TBool iSkipRomBitmapTests; sl@0: }; sl@0: sl@0: class CTDefectStep : public CTGraphicsStep sl@0: { sl@0: public: sl@0: CTDefectStep(); sl@0: protected: sl@0: //from CTGraphicsStep sl@0: virtual CTGraphicsBase* CreateTestL(); sl@0: virtual void TestSetupL(); sl@0: virtual void TestClose(); sl@0: }; sl@0: sl@0: _LIT(KTDefectStep,"TDefect"); sl@0: sl@0: sl@0: #endif//__TDEFECT_H__ sl@0: