Dali 3D User Interface Engine
List of all members | Public Member Functions | Private Member Functions | Private Attributes
Dali::Internal::Adaptor::FpsTracker Class Reference

Tracks the frames per second. More...

#include <fps-tracker.h>

Public Member Functions

 FpsTracker (const EnvironmentOptions &environmentOptions)
 Create the FPS Tracker. More...
 
 ~FpsTracker ()
 Non-virtual destructor; UpdateThread is not suitable as a base class. More...
 
void Track (float secondsFromLastFrame)
 When DALI_FPS_TRACKING is enabled, this method calculates the frame rates for the specified time period. More...
 
bool Enabled () const
 

Private Member Functions

void OutputFPSRecord ()
 Output the FPS information when the FSP tracking is enabled, it is called when the specified tracking period is elapsed or in the destructor when the process finished beforehand. More...
 

Private Attributes

float mFpsTrackingSeconds
 fps tracking time length in seconds More...
 
float mFrameCount
 how many frames occurred during tracking period More...
 
float mElapsedTime
 time elapsed from previous fps tracking output More...
 

Detailed Description

Tracks the frames per second.

Can also output the FPS to a file if required.

Definition at line 37 of file fps-tracker.h.

Constructor & Destructor Documentation

Dali::Internal::Adaptor::FpsTracker::FpsTracker ( const EnvironmentOptions environmentOptions)

Create the FPS Tracker.

Parameters
[in]environmentOptionsenvironment options

Definition at line 42 of file fps-tracker.cpp.

Dali::Internal::Adaptor::FpsTracker::~FpsTracker ( )

Non-virtual destructor; UpdateThread is not suitable as a base class.

Definition at line 49 of file fps-tracker.cpp.

References mFpsTrackingSeconds, and OutputFPSRecord().

Here is the call graph for this function:

Member Function Documentation

bool Dali::Internal::Adaptor::FpsTracker::Enabled ( ) const
Returns
Whether FPS tracking is enabled.

Definition at line 75 of file fps-tracker.cpp.

References mFpsTrackingSeconds.

Referenced by Dali::Internal::Adaptor::CombinedUpdateRenderController::UpdateRenderThread(), and Dali::Internal::Adaptor::SingleThreadController::UpdateTimeSinceLastRender().

Here is the caller graph for this function:

void Dali::Internal::Adaptor::FpsTracker::OutputFPSRecord ( )
private

Output the FPS information when the FSP tracking is enabled, it is called when the specified tracking period is elapsed or in the destructor when the process finished beforehand.

Definition at line 80 of file fps-tracker.cpp.

References DALI_LOG_FPS, Dali::Internal::Adaptor::anonymous_namespace{fps-tracker.cpp}::DALI_TEMP_UPDATE_FPS_FILE(), mElapsedTime, and mFrameCount.

Referenced by Track(), and ~FpsTracker().

Here is the call graph for this function:

Here is the caller graph for this function:

void Dali::Internal::Adaptor::FpsTracker::Track ( float  secondsFromLastFrame)

When DALI_FPS_TRACKING is enabled, this method calculates the frame rates for the specified time period.

Parameters
[in]secondsFromLastFrameThe time (in seconds) that has elapsed since the last frame.

Definition at line 57 of file fps-tracker.cpp.

References mElapsedTime, mFpsTrackingSeconds, mFrameCount, and OutputFPSRecord().

Referenced by Dali::Internal::Adaptor::UpdateThread::Run(), Dali::Internal::Adaptor::SingleThreadController::UpdateRender(), and Dali::Internal::Adaptor::CombinedUpdateRenderController::UpdateRenderThread().

Here is the call graph for this function:

Here is the caller graph for this function:

Member Data Documentation

float Dali::Internal::Adaptor::FpsTracker::mElapsedTime
private

time elapsed from previous fps tracking output

Definition at line 77 of file fps-tracker.h.

Referenced by OutputFPSRecord(), and Track().

float Dali::Internal::Adaptor::FpsTracker::mFpsTrackingSeconds
private

fps tracking time length in seconds

Definition at line 75 of file fps-tracker.h.

Referenced by Enabled(), Track(), and ~FpsTracker().

float Dali::Internal::Adaptor::FpsTracker::mFrameCount
private

how many frames occurred during tracking period

Definition at line 76 of file fps-tracker.h.

Referenced by OutputFPSRecord(), and Track().


The documentation for this class was generated from the following files:
Dali Docs Home
Read more about Dali