os/graphics/graphicsdeviceinterface/bitgdi/tbit/TDefect.h
author sl
Tue, 10 Jun 2014 14:32:02 +0200
changeset 1 260cb5ec6c19
permissions -rw-r--r--
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".
     7 //
     8 // Initial Contributors:
     9 // Nokia Corporation - initial contribution.
    10 //
    11 // Contributors:
    12 //
    13 // Description:
    14 //
    15 
    16 //This file contains test bitmap file names for TDefect test app.
    17 #ifndef __TDEFECT_H__
    18 #define __TDEFECT_H__
    19 
    20 
    21 #include <bitdev.h>
    22 #include "TGraphicsHarness.h"
    23 
    24 //The next enum is used by 16 bpp and 24 bpp bitmap compression tests.
    25 typedef enum 
    26 	{
    27 	E16BppBmpType,
    28 	E24BppBmpType,
    29 	//
    30 	//New enum members - insert them here
    31 	//
    32 	ELastBmpType
    33 	} TBitmapType;
    34 
    35 //The main test class. Add your test methods here.
    36 class CTDefect : public CTGraphicsBase
    37 	{
    38 public:
    39 	typedef enum {EScalingAllowed, EScalingNotAllowed} TAllowScaling;
    40 public:
    41 	CTDefect(CTestStep* aStep);
    42 	~CTDefect();
    43 
    44 protected:
    45 //from 	CTGraphicsStep
    46 	virtual void RunTestCaseL(TInt aCurTestCase);
    47 	void ConstructL();
    48 private:
    49 	void CreateScreenDeviceL(TAllowScaling aScaling = EScalingAllowed);
    50 	TInt CreateScreenDeviceL(TDisplayMode aDisplayMode, TAllowScaling aScaling = EScalingAllowed);
    51 	void DEF014364L();
    52 	void DEF017758();
    53 	void DEF017758L();
    54 	void DEF023605L();
    55 	void BitmapCompressionL(TBitmapType aBitmapType);
    56 	void NewRscFormatL();
    57 	void INC031920L(TBitmapType aBitmapType, TBool aRomBitmap);
    58 	void Test8bitBmpComressionL();
    59 	void Test12bitBmpComressionL();
    60 	void ZeroSizeBitmap();
    61 	void DEF034134L();
    62 	void TestTilingHorizontalAndVerticalL();
    63 	void DrawPieBorderlineCasesL();
    64 	void INC037380L();
    65 	void INC037474L();
    66 	void INC070043L();
    67 	CFbsBitGcBitmap* LoadBitmapLC(const TDesC& aFileName);
    68 	void TestSettingDisplayModeL();
    69 	void TestSettingDisplayMode2L();
    70 	void SetAndCheckDisplayMode(TDisplayMode aMode, const TSize& aInitialSize);
    71 	void CheckScanLine();
    72 	void TestSwappingWidthAndHeightL();
    73 	void INC037370L();
    74 	void DEF038774L();
    75   void TestBitBltOperationsOn16muUndefinedByteL();
    76 	void ExternalizeInternalizeCFbsBitGCExtraData();
    77 	
    78 	void DeleteBitmap();
    79 	void DeleteBitmapDevice();
    80 	void DeleteScreenDevice();
    81 	void DeleteGraphicsContext();
    82 
    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);
    86 
    87 	void CreateFontL();
    88 	void DestroyFont();
    89 
    90 	void DrawPie(const TDesC& aText, const TRect& aRc, const TPoint& aPtStart, const TPoint& aPtEnd);
    91 	void CreateBitmapL(const TSize& aSize, TDisplayMode aMode);
    92 	void INC042156L();
    93 	void TestOom();
    94 	void BitmapsSwappingTest();
    95 	void INC093055L();
    96 	void PDEF103809L();
    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();
   109 
   110 private:
   111 	CFbsScreenDevice* iDevice;
   112 	CFbsBitmapDevice* iBmpDevice;
   113 	CFbsBitGc* iGc;
   114 	CFbsBitmap* iBitmap;
   115 	TSize iSize;
   116 	TDisplayMode iCurrentMode;	
   117 	TBool iSkipRomBitmapTests;
   118 	};
   119 
   120 class CTDefectStep : public CTGraphicsStep
   121 	{
   122 public:
   123 	CTDefectStep();
   124 protected:	
   125 	//from CTGraphicsStep
   126 	virtual CTGraphicsBase* CreateTestL();
   127 	virtual void TestSetupL();
   128 	virtual void TestClose();
   129 	};
   130 
   131 _LIT(KTDefectStep,"TDefect");
   132 
   133 
   134 #endif//__TDEFECT_H__
   135