sl@0
|
1 |
// Copyright (c) 2004-2010 Nokia Corporation and/or its subsidiary(-ies).
|
sl@0
|
2 |
// All rights reserved.
|
sl@0
|
3 |
// This component and the accompanying materials are made available
|
sl@0
|
4 |
// under the terms of "Eclipse Public License v1.0"
|
sl@0
|
5 |
// which accompanies this distribution, and is available
|
sl@0
|
6 |
// at the URL "http://www.eclipse.org/legal/epl-v10.html".
|
sl@0
|
7 |
//
|
sl@0
|
8 |
// Initial Contributors:
|
sl@0
|
9 |
// Nokia Corporation - initial contribution.
|
sl@0
|
10 |
//
|
sl@0
|
11 |
// Contributors:
|
sl@0
|
12 |
//
|
sl@0
|
13 |
// Description:
|
sl@0
|
14 |
// This file contains test bitmap file names for TBitmap test app.
|
sl@0
|
15 |
//
|
sl@0
|
16 |
//
|
sl@0
|
17 |
|
sl@0
|
18 |
#ifndef __TBITMAP_H__
|
sl@0
|
19 |
#define __TBITMAP_H__
|
sl@0
|
20 |
|
sl@0
|
21 |
#include <gdi.h>
|
sl@0
|
22 |
#include "TFBS.H"
|
sl@0
|
23 |
#include "test/TGraphicsHarness.h"
|
sl@0
|
24 |
#include "fbsbitmapasyncstreamer.h"
|
sl@0
|
25 |
|
sl@0
|
26 |
|
sl@0
|
27 |
//The main test class. Add your test methods here.
|
sl@0
|
28 |
class CTBitmap : public CTGraphicsBase
|
sl@0
|
29 |
{
|
sl@0
|
30 |
public:
|
sl@0
|
31 |
CTBitmap(CTestStep* aStep);
|
sl@0
|
32 |
~CTBitmap();
|
sl@0
|
33 |
void DeleteScanLineBuffer();
|
sl@0
|
34 |
protected:
|
sl@0
|
35 |
//from CTGraphicsStep
|
sl@0
|
36 |
virtual void RunTestCaseL(TInt aCurTestCase);
|
sl@0
|
37 |
|
sl@0
|
38 |
private:
|
sl@0
|
39 |
void CheckScanlineL();
|
sl@0
|
40 |
void StreamBitmap();
|
sl@0
|
41 |
void StreamRectangle();
|
sl@0
|
42 |
void GetScanline();
|
sl@0
|
43 |
void SetScanline();
|
sl@0
|
44 |
void StretchScanline();
|
sl@0
|
45 |
void LoadInSegments();
|
sl@0
|
46 |
void SaveInSegments();
|
sl@0
|
47 |
void MonoDetect();
|
sl@0
|
48 |
void ChunkPileL();
|
sl@0
|
49 |
void LargeBitmaps();
|
sl@0
|
50 |
void HugeBitmaps();
|
sl@0
|
51 |
void Resize();
|
sl@0
|
52 |
void BitmapUtil();
|
sl@0
|
53 |
void BitmapTiming();
|
sl@0
|
54 |
void InvalidBitmap();
|
sl@0
|
55 |
void SaveAndLoad();
|
sl@0
|
56 |
void SaveAndLoadFast();
|
sl@0
|
57 |
void Color256BitmapUtil();
|
sl@0
|
58 |
void HardwareBitmaps();
|
sl@0
|
59 |
void Compress();
|
sl@0
|
60 |
void INC036062L();
|
sl@0
|
61 |
void PerformanceTest_INC036062L();
|
sl@0
|
62 |
void INC037474L();
|
sl@0
|
63 |
void DEF038286L();
|
sl@0
|
64 |
void DEF038286_2L();
|
sl@0
|
65 |
void MonohromeL();
|
sl@0
|
66 |
void GetVerticalScanLineL();
|
sl@0
|
67 |
void GetVerticalScanLinePerformanceL();
|
sl@0
|
68 |
void TwoComprLines();
|
sl@0
|
69 |
void DEF071843_16MAL();
|
sl@0
|
70 |
void DEF071843_16MUL();
|
sl@0
|
71 |
void DEF071843_16ML();
|
sl@0
|
72 |
void DEF074623_16MAL();
|
sl@0
|
73 |
#ifdef _DEBUG
|
sl@0
|
74 |
void DEF095361_16MAL();
|
sl@0
|
75 |
#endif
|
sl@0
|
76 |
void TestPaletteCompressionL() ;
|
sl@0
|
77 |
void TestSynchronousBackgroundPaletteCompressionL() ;
|
sl@0
|
78 |
void TestAsynchronousBackgroundPaletteCompressionL() ;
|
sl@0
|
79 |
void CompareColourLikeness(const TRgb& aSrc, const TRgb& aDest, TInt aDifference=0);
|
sl@0
|
80 |
void GetAllBitmapsIdsL();
|
sl@0
|
81 |
void CheckBadBmp();
|
sl@0
|
82 |
void CheckSetDisplayModeL();
|
sl@0
|
83 |
void MultiThreadedTestsL();
|
sl@0
|
84 |
void MultiThreadedResizeTestL();
|
sl@0
|
85 |
void MultiThreadedCompressTestL();
|
sl@0
|
86 |
void DoMultiThreadedTestL(const TDesC& aThreadName, TInt (*aBitmapFunction)(CFbsBitmap*), TBool (*aCheckFunction)(const CFbsBitmap*));
|
sl@0
|
87 |
#ifdef SYMBIAN_DEBUG_FBS_LOCKHEAP
|
sl@0
|
88 |
void MultiThreadedLockHeapTestL();
|
sl@0
|
89 |
#endif
|
sl@0
|
90 |
void TestBgCompressL();
|
sl@0
|
91 |
void TestBgCompressInUseL();
|
sl@0
|
92 |
void TestDisconnectWithBitmapL();
|
sl@0
|
93 |
void TestTouchedAndVolatileL();
|
sl@0
|
94 |
void TestBitmapWhiteFillL();
|
sl@0
|
95 |
#ifdef _DEBUG
|
sl@0
|
96 |
void TestBitmapUtilWithUnsupportedBitmap(const TDesC& aThreadName, TAny* aFunctionPtr);
|
sl@0
|
97 |
void TestBitmapUtilWithUnsupportedBitmaps();
|
sl@0
|
98 |
#endif
|
sl@0
|
99 |
private:
|
sl@0
|
100 |
void DoStreamBitmapSizes(TDisplayMode aDispMode);
|
sl@0
|
101 |
void DoStreamBitmap(const TSize& aSize,TDisplayMode aDispMode,TBool aBlank);
|
sl@0
|
102 |
void DoStreamRectangle(TDisplayMode aDispMode,TBool aBlank);
|
sl@0
|
103 |
void DoGetScanline(const TSize& aSize,TDisplayMode aDispMode);
|
sl@0
|
104 |
void DoGetScanlineCheck1(CFbsBitmap& aBitmap,CFbsBitmap& aReference,const TSize& aSize,TDisplayMode aDispMode);
|
sl@0
|
105 |
void DoGetScanlineCheck2(CFbsBitmap& aBitmap,CFbsBitmap& aReference,const TSize& aSize,TDisplayMode aDispMode);
|
sl@0
|
106 |
void DoGetScanlineCheck3(CFbsBitmap& aBitmap,TDisplayMode aDispMode);
|
sl@0
|
107 |
void DoGetScanlineAlt(TDisplayMode aDispMode);
|
sl@0
|
108 |
void DoSetScanline(TDisplayMode aDispMode);
|
sl@0
|
109 |
void DoStretchScanline(const TSize& aSize,TDisplayMode aDispMode);
|
sl@0
|
110 |
void DoMonoDetect(TDisplayMode aDisplayMode);
|
sl@0
|
111 |
void DoLargeBitmaps(const TSize& aSize,TDisplayMode aDisplayMode);
|
sl@0
|
112 |
void DoHugeBitmaps(const TSize& aSize,TDisplayMode aDisplayMode);
|
sl@0
|
113 |
void DoResize(TDisplayMode aDispMode);
|
sl@0
|
114 |
void DoBitmapUtil(const TSize& aSize,TDisplayMode aDispMode);
|
sl@0
|
115 |
void DoSaveAndLoad(const TSize& aSize,TDisplayMode aDispMode,TBool aBlank);
|
sl@0
|
116 |
void FuzzyCompareBitmapsColor256(CFbsBitmapEx& aBmp1,CFbsBitmapEx& aBmp2,TUint aDifLimit=7);
|
sl@0
|
117 |
void CheckScanLine(CFbsBitmapEx& aBitmap,CFbsBitmapEx& aReference,TDisplayMode aDispMode);
|
sl@0
|
118 |
void CheckWhite(TUint8* aData,TInt aDataLength,TDisplayMode aDispMode);
|
sl@0
|
119 |
void CompareBitmaps(CFbsBitmapEx& aBmp1,CFbsBitmapEx& aBmp2,TDisplayMode aDispMode);
|
sl@0
|
120 |
void DoCompareBitmaps(CFbsBitmapEx& aBmp1,CFbsBitmapEx& aBmp2,TDisplayMode aDispMode, TPoint aLineOrigin, TSize aBmpSize);
|
sl@0
|
121 |
void CopyBitmap(CFbsBitmapEx& aBmp1,const CFbsBitmapEx& aBmp2);
|
sl@0
|
122 |
void BlankBitmap(CFbsBitmapEx& aBitmap);
|
sl@0
|
123 |
void FillBitmap(CFbsBitmapEx& aBitmap);
|
sl@0
|
124 |
void StripeBitmap(CFbsBitmapEx& aBitmap);
|
sl@0
|
125 |
TRgb ExtractRgb(TUint8* aBuffer,TInt aPixelOffset,TDisplayMode aDispMode);
|
sl@0
|
126 |
|
sl@0
|
127 |
static TInt BmpLoadCallBack(TAny* aPtr);
|
sl@0
|
128 |
static TInt BmpSaveCallBack(TAny* aPtr);
|
sl@0
|
129 |
CFbsBitmap* CreateBitmapLC(const TSize& aSize, TDisplayMode aMode);
|
sl@0
|
130 |
CFbsBitmap* CreateBitmapLC(const TSize& aSize, TDisplayMode aMode, const CFbsBitmap* aSrcBmp);
|
sl@0
|
131 |
CFbsBitmap* LoadBitmapLC(const TDesC& aFileName);
|
sl@0
|
132 |
void LoadAndCompressBitmapLC(CFbsBitmap*& aBmp, const TDesC& aBmpFile);
|
sl@0
|
133 |
void LoadAndNotCompressBitmapLC(CFbsBitmap*& aBmp, const TDesC& aBmpFile);
|
sl@0
|
134 |
void TestAssortedBPPandColourDepthL(const TDesC& aFilename, RFbsSession* aFbs);
|
sl@0
|
135 |
void DoStretchScanline(const TSize& aSize,TDisplayMode aSrcMode, TDisplayMode aDstMode, TBool aUseCompareLikeness);
|
sl@0
|
136 |
TInt ColorDifference(TDisplayMode aMode,TInt aAlpha=0xff);
|
sl@0
|
137 |
private:
|
sl@0
|
138 |
CFbsBitmapAsyncStreamer* iBmpHandler;
|
sl@0
|
139 |
CFbsBitmap* iBitmap;
|
sl@0
|
140 |
CActiveScheduler* iAs;
|
sl@0
|
141 |
RFs iFs;
|
sl@0
|
142 |
TFileName iTestBitmapName;
|
sl@0
|
143 |
TBool iSkipRomBitmapTests;
|
sl@0
|
144 |
};
|
sl@0
|
145 |
|
sl@0
|
146 |
|
sl@0
|
147 |
class CTBitmapStep : public CTGraphicsStep
|
sl@0
|
148 |
{
|
sl@0
|
149 |
public:
|
sl@0
|
150 |
CTBitmapStep();
|
sl@0
|
151 |
protected:
|
sl@0
|
152 |
//from CTGraphicsStep
|
sl@0
|
153 |
virtual CTGraphicsBase* CreateTestL();
|
sl@0
|
154 |
virtual void TestSetupL();
|
sl@0
|
155 |
virtual void TestClose();
|
sl@0
|
156 |
};
|
sl@0
|
157 |
|
sl@0
|
158 |
_LIT(KTBitmapStep,"TBitmap");
|
sl@0
|
159 |
|
sl@0
|
160 |
#endif//__TBITMAP_H__
|