|
1 // Copyright (c) 1997-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 #if !defined(__TSWITCH_H__) |
|
17 #define __TSWITCH_H__ |
|
18 |
|
19 #include <bitdev.h> |
|
20 #include "TGraphicsHarness.h" |
|
21 |
|
22 class CTSwitch : public CTGraphicsBase |
|
23 { |
|
24 public: |
|
25 CTSwitch(CTestStep* aStep); |
|
26 ~CTSwitch(); |
|
27 protected: |
|
28 //from CTGraphicsStep |
|
29 virtual void RunTestCaseL(TInt aCurTestCase); |
|
30 private: |
|
31 void TestL(); |
|
32 TBool SetModeL(TDisplayMode aDispMode); |
|
33 void FillScreen(); |
|
34 TBool SwitchModeL(TDisplayMode aDispMode); |
|
35 void CheckSwitch(TDisplayMode aOldDispMode,TDisplayMode aNewDispMode); |
|
36 void CheckBuffers(TDisplayMode aOldDispMode,TDisplayMode aNewDispMode, TUint aLineWidth,TInt aDitherOffset); |
|
37 void CheckRgbs(TDisplayMode aOldDispMode,TRgb aSrceRgb,TDisplayMode aNewDispMode,TRgb aDestRgb,TInt aDitherOffset); |
|
38 void ConvertRgb(TRgb& aRgb,TDisplayMode aDispMode,TInt aDitherOffset); |
|
39 private: |
|
40 CFbsBitmap* iBitmap; |
|
41 CFbsScreenDevice* iDevice; |
|
42 CFbsBitGc* iGc; |
|
43 CFbsScreenDevice* iAltDevice; |
|
44 CFbsBitGc* iAltGc; |
|
45 TRgb* iSrceBuffer; |
|
46 TRgb* iDestBuffer; |
|
47 }; |
|
48 |
|
49 class CTSwitchStep : public CTGraphicsStep |
|
50 { |
|
51 public: |
|
52 CTSwitchStep(); |
|
53 protected: |
|
54 //from CTGraphicsStep |
|
55 virtual CTGraphicsBase* CreateTestL(); |
|
56 virtual void TestSetupL(); |
|
57 virtual void TestClose(); |
|
58 }; |
|
59 |
|
60 _LIT(KTSwitchStep,"TSwitch"); |
|
61 |
|
62 |
|
63 #endif |