1 #ifndef __DALI_INTERNAL_FPS_TRACKER_H__
2 #define __DALI_INTERNAL_FPS_TRACKER_H__
5 * Copyright (c) 2015 Samsung Electronics Co., Ltd.
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
11 * http://www.apache.org/licenses/LICENSE-2.0
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.
30 class EnvironmentOptions;
33 * Tracks the frames per second.
35 * Can also output the FPS to a file if required.
42 * Create the FPS Tracker.
43 * @param[in] environmentOptions environment options
45 FpsTracker( const EnvironmentOptions& environmentOptions );
48 * Non-virtual destructor; UpdateThread is not suitable as a base class.
53 * When DALI_FPS_TRACKING is enabled, this method calculates the frame rates for the specified time period
55 * @param[in] secondsFromLastFrame The time (in seconds) that has elapsed since the last frame.
57 void Track(float secondsFromLastFrame);
60 * @return Whether FPS tracking is enabled.
67 * Output the FPS information
68 * when the FSP tracking is enabled,
69 * it is called when the specified tracking period is elapsed or in the destructor when the process finished beforehand
71 void OutputFPSRecord();
75 float mFpsTrackingSeconds; ///< fps tracking time length in seconds
76 float mFrameCount; ///< how many frames occurred during tracking period
77 float mElapsedTime; ///< time elapsed from previous fps tracking output
80 } // namespace Adaptor
82 } // namespace Internal
86 #endif // __DALI_INTERNAL_FPS_TRACKER_H__