Dali 3D User Interface Engine
update-status-logger.cpp
Go to the documentation of this file.
1 /*
2  * Copyright (c) 2015 Samsung Electronics Co., Ltd.
3  *
4  * Licensed under the Apache License, Version 2.0 (the "License");
5  * you may not use this file except in compliance with the License.
6  * You may obtain a copy of the License at
7  *
8  * http://www.apache.org/licenses/LICENSE-2.0
9  *
10  * Unless required by applicable law or agreed to in writing, software
11  * distributed under the License is distributed on an "AS IS" BASIS,
12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13  * See the License for the specific language governing permissions and
14  * limitations under the License.
15  *
16  */
17 
18 // CLASS HEADER
19 #include "update-status-logger.h"
20 
21 // EXTERNAL INCLUDES
22 #include <string>
24 
25 // INTERNAL INCLUDES
27 
28 namespace Dali
29 {
30 
31 namespace Internal
32 {
33 
34 namespace Adaptor
35 {
36 
38 : mStatusLogInterval( environmentOptions.GetUpdateStatusLoggingFrequency() ),
39  mStatusLogCount( 0u )
40 {
41 }
42 
44 {
45 }
46 
47 void UpdateStatusLogger::Log( unsigned int keepUpdatingStatus )
48 {
49  if ( mStatusLogInterval )
50  {
51  std::string oss;
52 
54  {
55  oss = "UpdateStatusLogging keepUpdating: ";
56  oss += (keepUpdatingStatus ? "true":"false");
57 
58  if ( keepUpdatingStatus )
59  {
60  oss += " because: ";
61  }
62 
63  if ( keepUpdatingStatus & Integration::KeepUpdating::STAGE_KEEP_RENDERING )
64  {
65  oss += "<Stage::KeepRendering() used> ";
66  }
67 
68  if ( keepUpdatingStatus & Integration::KeepUpdating::ANIMATIONS_RUNNING )
69  {
70  oss += "<Animations running> ";
71  }
72 
73  if ( keepUpdatingStatus & Integration::KeepUpdating::LOADING_RESOURCES )
74  {
75  oss += "<Resources loading> ";
76  }
77 
78  if ( keepUpdatingStatus & Integration::KeepUpdating::MONITORING_PERFORMANCE )
79  {
80  oss += "<Monitoring performance> ";
81  }
82 
83  if ( keepUpdatingStatus & Integration::KeepUpdating::RENDER_TASK_SYNC )
84  {
85  oss += "<Render task waiting for completion> ";
86  }
87 
88  DALI_LOG_UPDATE_STATUS( "%s\n", oss.c_str());
89  }
90  }
91 }
92 
93 } // namespace Adaptor
94 
95 } // namespace Internal
96 
97 } // namespace Dali
Dali Docs Home
Read more about Dali