Dali 3D User Interface Engine
stat-context.h
Go to the documentation of this file.
1 #ifndef __DALI_INTERNAL_ADAPTOR_STAT_CONTEXT_H__
2 #define __DALI_INTERNAL_ADAPTOR_STAT_CONTEXT_H__
3 
4 /*
5  * Copyright (c) 2015 Samsung Electronics Co., Ltd.
6  *
7  * Licensed under the Apache License, Version 2.0 (the "License");
8  * you may not use this file except in compliance with the License.
9  * You may obtain a copy of the License at
10  *
11  * http://www.apache.org/licenses/LICENSE-2.0
12  *
13  * Unless required by applicable law or agreed to in writing, software
14  * distributed under the License is distributed on an "AS IS" BASIS,
15  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16  * See the License for the specific language governing permissions and
17  * limitations under the License.
18  *
19  */
20 
21 // EXTERNAL INCLUDES
22 #include <string>
23 
24 // INTERNAL INCLUDES
29 
30 namespace Dali
31 {
32 
33 namespace Internal
34 {
35 
36 namespace Adaptor
37 {
38 
44 {
45 
46 public:
47 
58  StatContext( unsigned int id,
59  const char* const contextName,
61  unsigned int logFrequencySeconds,
62  StatContextLogInterface& logInterface );
63 
64 
68  ~StatContext();
69 
73  unsigned int GetId() const;
74 
78  const char* const GetName() const;
79 
87  const char* const GetMarkerDescription( PerformanceInterface::MarkerType type ) const;
88 
94  void SetLogFrequency( unsigned int logFrequencySeconds );
95 
101  void EnableLogging( bool enableLogging );
102 
108  void ProcessCustomMarker( const PerformanceMarker& marker );
109 
115  void ProcessInternalMarker( const PerformanceMarker& marker );
116 
117  private:
118 
124  void RecordMarker( const PerformanceMarker& marker );
125 
130  void FrameTick( const PerformanceMarker& marker );
131 
135  void LogMarker();
136 
137 
138  private:
139 
140  StatContext();
141 
142  StatContext( const StatContext& );
143 
144  StatContext& operator=( const StatContext& );
145 
146  private:
147 
150  const char* const mName;
153  const std::string mNamePlusStart;
154  const std::string mNamePlusEnd;
155  unsigned int mId;
160 
161 };
162 
163 
164 } // namespace Internal
165 
166 } // namespace Adaptor
167 
168 } // namespace Dali
169 
170 #endif
Dali Docs Home
Read more about Dali