|
1 // Copyright (c) 2007-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 /** |
|
17 @file |
|
18 @test |
|
19 @internalComponent |
|
20 */ |
|
21 |
|
22 #ifndef __T_FPSAPP_ENG_H__ |
|
23 #define __T_FPSAPP_ENG_H__ |
|
24 |
|
25 #include <w32std.h> |
|
26 #include <graphics/surface.h> //TSurfaceId |
|
27 #include <graphics/surfacemanager.h> //RSurfaceManager |
|
28 #include <graphics/surfaceupdateclient.h> |
|
29 |
|
30 _LIT(KTFpsAppPanicTxt, "t_fpsapp.exe"); |
|
31 |
|
32 class CFpsAppEng : public CTimer |
|
33 { |
|
34 public: |
|
35 static CFpsAppEng* NewL(RWsSession& aClient, CWsScreenDevice& aScreenDevice, RWindow& aWindow); |
|
36 ~CFpsAppEng(); |
|
37 |
|
38 void StartDrawing(); |
|
39 |
|
40 |
|
41 private: |
|
42 // Implement CTimer |
|
43 void RunL(); |
|
44 void DoCancel(); |
|
45 |
|
46 // private constructors - use NewL to construct a CTPseudoAppEng! |
|
47 CFpsAppEng(RWsSession& aClient, CWsScreenDevice& aScreenDevice, RWindow& aWindow); |
|
48 void ConstructL(); |
|
49 |
|
50 // Surface |
|
51 void CreateSurfaceManager(); |
|
52 void CreateSurface(TSurfaceId& aSurfaceId); |
|
53 void CreateSurfaceUpdateSessionL(); |
|
54 void DestroySurface(); |
|
55 |
|
56 private: |
|
57 RWsSession& iClient; |
|
58 RWindow& iWindow; |
|
59 CWsScreenDevice& iScreenDevice; |
|
60 RSurfaceManager iSurfaceManager; |
|
61 TSurfaceId iSurfaceId; |
|
62 RChunk iChunk; |
|
63 RSurfaceUpdateSession iSurfaceUpdateSession; |
|
64 TUint32* iSurfacePtr; |
|
65 TUint32* iBufPtr1; |
|
66 TInt iNoOfBytes; |
|
67 TInt iNoOfPixels; |
|
68 TBool iCol1; |
|
69 TBool iCol2; |
|
70 }; |
|
71 |
|
72 #endif //__T_FPSAPP_ENG_H__ |
|
73 |
|
74 |
|
75 |