sl@0: // Copyright (c) 2003-2010 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: #ifndef __TDEFECT2_H__ sl@0: #define __TDEFECT2_H__ sl@0: sl@0: #include sl@0: #include "TGraphicsHarness.h" sl@0: sl@0: // sl@0: // sl@0: //The main test class. Add your test methods here. sl@0: class CTDefect2 : public CTGraphicsBase sl@0: { sl@0: public: sl@0: CTDefect2(CTestStep* aStep); sl@0: ~CTDefect2(); sl@0: void TestL(); sl@0: protected: sl@0: //from CTGraphicsStep sl@0: virtual void RunTestCaseL(TInt aCurTestCase); sl@0: void ConstructL(); sl@0: private: sl@0: void DEF039237L(); sl@0: void DEF039331L(); sl@0: void DEF039650L(); sl@0: void ExerciseCopyRect(); sl@0: TBool CopyRectReadOutsideBitmap(TInt aSingleMode =0,TInt aRetriesLeft =10); sl@0: sl@0: void GetPixelPerformance1L(); sl@0: void RotateMoveTextL(); sl@0: void SwapWidthAndHeightL(); sl@0: sl@0: void DoRotateMoveTextL(); sl@0: void CreateScrDevAndContextL(); sl@0: TInt CreateScrDevAndContext(TDisplayMode aDisplayMode); sl@0: TInt CreateScrDevAndContext(TInt aScreenNo, TDisplayMode aDisplayMode); sl@0: void DeleteScreenDevice(); sl@0: void DeleteGraphicsContext(); sl@0: void CreateBitmapL(const TSize& aSize, TDisplayMode aMode); sl@0: void DeleteBitmap(); sl@0: void DeleteBitmapDevice(); sl@0: void CreateFontL(); sl@0: void DestroyFont(); sl@0: void NonZeroOriginClearL(); sl@0: void DEF115395L(); sl@0: void TestDirtyMaskBitmapL(); sl@0: void ZeroSizedPatternBrushL(); sl@0: void CFbsBitGcInternalizeLFailL(); sl@0: void PixelsToTwipsConversionCheck(); sl@0: void CopyRectAlphaL(); sl@0: void TestSetBitsL(); sl@0: void TestMaskForAllCombinationL(TInt aChannelControl); sl@0: void TestMaskForSelectedValuesL(TInt aChannelControl); sl@0: void DoMaskTestL(TInt aSrcChannel, TInt aSrcMask, TInt aTargetMask, TInt aTargetChannel, TInt aChannelControl, CFbsBitmap* aSrcBmp, CFbsBitmap* aMaskBmp, CFbsBitmap* aTargetBmp, CBitmapContext* aTargetBmpContext); sl@0: void CheckValues(TUint aAlphaPixelValue, TUint aChannelPixelValue, TInt& aFailsPerPass, TInt aTargetMask, TInt aTargetChannel, TInt aSrcMask, TInt aSrcChannel, TInt aOtherMask, TUint* aReadPixel); sl@0: void LogColourEvent(TInt aPreMulDestPixColor,TInt aNonPreMulDestPixColor,TInt aPreMulSrcPixelColor,TInt aNonPreMulSrcPixelColor,TReal aVal1,TReal aVal2,TReal aVal3,TRefByValue aMsg,TBool aErr); sl@0: sl@0: private: sl@0: CFbsScreenDevice* iScrDev; sl@0: CFbsBitGc* iGc; sl@0: TSize iSize; sl@0: TDisplayMode iCurrentMode; sl@0: CFbsBitmap* iBitmap; sl@0: CFbsBitmapDevice* iBmpDevice; sl@0: }; sl@0: sl@0: class CTDefect2Step : public CTGraphicsStep sl@0: { sl@0: public: sl@0: CTDefect2Step(); 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(KTDefect2Step,"TDefect2"); sl@0: sl@0: #endif