|
1 // Copyright (c) 1995-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 // STDGRAPHICTESTDRAWER.CPP |
|
15 // |
|
16 // |
|
17 |
|
18 #ifndef __STDGRAPHICDRAWERTEST_H__ |
|
19 #define __STDGRAPHICDRAWERTEST_H__ |
|
20 |
|
21 #include <e32std.h> |
|
22 #include "Graphics/WSGRAPHICDRAWER.H" |
|
23 #include <Graphics/WSGRAPHICDRAWERINTERFACE.H> |
|
24 |
|
25 class MWsGraphicDrawerContext; |
|
26 |
|
27 NONSHARABLE_CLASS(CFrameRate): public CBase |
|
28 { |
|
29 public: |
|
30 TInt CountSamples() const; |
|
31 void Sample() const; |
|
32 TInt Fps() const; |
|
33 private: |
|
34 static const TInt KMaxSamples = 25; |
|
35 mutable TInt iNumSamples; |
|
36 mutable TInt64 iSamples[KMaxSamples]; |
|
37 }; |
|
38 |
|
39 NONSHARABLE_CLASS(CWsGraphicDrawerTestFrameRate): public CWsGraphicDrawer |
|
40 { |
|
41 public: |
|
42 enum |
|
43 { |
|
44 EImplUid = 0x10281AB2 |
|
45 }; |
|
46 static CWsGraphicDrawerTestFrameRate* CreateL(); |
|
47 ~CWsGraphicDrawerTestFrameRate(); |
|
48 void ConstructL(MWsGraphicDrawerEnvironment& aEnv,const TGraphicDrawerId& aId,MWsClient& aOwner,const TDesC8& aData); |
|
49 void HandleMessage(const TDesC8& aData); |
|
50 private: |
|
51 void DoDraw(MWsGc& aGc,const TRect& aRect,const TDesC8& aData) const; |
|
52 private: |
|
53 CWsGraphicDrawerTestFrameRate(); |
|
54 CFrameRate iFps; |
|
55 MWsGraphicDrawerContext* iContext; |
|
56 }; |
|
57 |
|
58 #endif //__STDGRAPHICDRAWERTEST_H__ |