os/graphics/graphicsdeviceinterface/bitgdi/tbit/TDefect2.h
author sl@SLION-WIN7.fritz.box
Fri, 15 Jun 2012 03:10:57 +0200
changeset 0 bde4ae8d615e
permissions -rw-r--r--
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".
     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 
    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);
    53 	void DeleteBitmap();
    54 	void DeleteBitmapDevice();
    55 	void CreateFontL();
    56 	void DestroyFont();
    57 	void NonZeroOriginClearL();
    58 	void DEF115395L();
    59 	void TestDirtyMaskBitmapL();
    60 	void ZeroSizedPatternBrushL();
    61 	void CFbsBitGcInternalizeLFailL();
    62 	void PixelsToTwipsConversionCheck();
    63 	void CopyRectAlphaL();
    64 	void TestSetBitsL();
    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);
    70 
    71 private:
    72 	CFbsScreenDevice* iScrDev;
    73 	CFbsBitGc* iGc;
    74 	TSize iSize;
    75 	TDisplayMode iCurrentMode;	
    76 	CFbsBitmap* iBitmap;
    77 	CFbsBitmapDevice* iBmpDevice;
    78 	};
    79 
    80 class CTDefect2Step : public CTGraphicsStep
    81 	{
    82 public:
    83 	CTDefect2Step();
    84 protected:	
    85 	//from CTGraphicsStep
    86 	virtual CTGraphicsBase* CreateTestL();
    87 	virtual void TestSetupL();
    88 	virtual void TestClose();
    89 	};
    90 
    91 _LIT(KTDefect2Step,"TDefect2");
    92 
    93 #endif