2 * Copyright (c) 2015 Samsung Electronics Co., Ltd.
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
8 * http://www.apache.org/licenses/LICENSE-2.0
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.
19 #include "update-status-logger.h"
23 #include <dali/integration-api/core.h>
26 #include <base/environment-options.h>
37 UpdateStatusLogger::UpdateStatusLogger( const EnvironmentOptions& environmentOptions )
38 : mStatusLogInterval( environmentOptions.GetUpdateStatusLoggingFrequency() ),
43 UpdateStatusLogger::~UpdateStatusLogger()
47 void UpdateStatusLogger::Log( unsigned int keepUpdatingStatus )
49 if ( mStatusLogInterval )
53 if ( !(++mStatusLogCount % mStatusLogInterval) )
55 oss = "UpdateStatusLogging keepUpdating: ";
56 oss += (keepUpdatingStatus ? "true":"false");
58 if ( keepUpdatingStatus )
63 if ( keepUpdatingStatus & Integration::KeepUpdating::STAGE_KEEP_RENDERING )
65 oss += "<Stage::KeepRendering() used> ";
68 if ( keepUpdatingStatus & Integration::KeepUpdating::ANIMATIONS_RUNNING )
70 oss += "<Animations running> ";
73 if ( keepUpdatingStatus & Integration::KeepUpdating::MONITORING_PERFORMANCE )
75 oss += "<Monitoring performance> ";
78 if ( keepUpdatingStatus & Integration::KeepUpdating::RENDER_TASK_SYNC )
80 oss += "<Render task waiting for completion> ";
83 DALI_LOG_UPDATE_STATUS( "%s\n", oss.c_str());
88 } // namespace Adaptor
90 } // namespace Internal