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 <dali/internal/system/common/update-status-logger.h>
22 #include <dali/integration-api/core.h>
26 #include <dali/internal/system/common/environment-options.h>
34 UpdateStatusLogger::UpdateStatusLogger(const EnvironmentOptions& environmentOptions)
35 : mStatusLogInterval(environmentOptions.GetUpdateStatusLoggingFrequency()),
40 UpdateStatusLogger::~UpdateStatusLogger()
44 void UpdateStatusLogger::Log(unsigned int keepUpdatingStatus)
46 if(mStatusLogInterval)
50 if(!(++mStatusLogCount % mStatusLogInterval))
52 oss = "UpdateStatusLogging keepUpdating: ";
53 oss += (keepUpdatingStatus ? "true" : "false");
55 if(keepUpdatingStatus)
60 if(keepUpdatingStatus & Integration::KeepUpdating::STAGE_KEEP_RENDERING)
62 oss += "<Stage::KeepRendering() used> ";
65 if(keepUpdatingStatus & Integration::KeepUpdating::ANIMATIONS_RUNNING)
67 oss += "<Animations running> ";
70 if(keepUpdatingStatus & Integration::KeepUpdating::MONITORING_PERFORMANCE)
72 oss += "<Monitoring performance> ";
75 if(keepUpdatingStatus & Integration::KeepUpdating::RENDER_TASK_SYNC)
77 oss += "<Render task waiting for completion> ";
80 DALI_LOG_UPDATE_STATUS("%s\n", oss.c_str());
85 } // namespace Adaptor
87 } // namespace Internal