Dali 3D User Interface Engine
Functions | Variables
Dali::Internal::Adaptor::anonymous_namespace{combined-update-render-controller.cpp} Namespace Reference

Functions

const unsigned int MILLISECONDS_PER_SECOND (1e+3)
 
const float NANOSECONDS_TO_SECOND (1e-9f)
 
const unsigned int NANOSECONDS_PER_SECOND (1e+9)
 
const unsigned int NANOSECONDS_PER_MILLISECOND (1e+6)
 
const float DEFAULT_FRAME_DURATION_IN_SECONDS (1.0f/60.0f)
 
const unsigned int DEFAULT_FRAME_DURATION_IN_MILLISECONDS (DEFAULT_FRAME_DURATION_IN_SECONDS *MILLISECONDS_PER_SECOND)
 
const unsigned int DEFAULT_FRAME_DURATION_IN_NANOSECONDS (DEFAULT_FRAME_DURATION_IN_SECONDS *NANOSECONDS_PER_SECOND)
 

Variables

const unsigned int CREATED_THREAD_COUNT = 1u
 
const int CONTINUOUS = -1
 
const int ONCE = 1
 
const unsigned int TRUE = 1u
 
const unsigned int FALSE = 0u
 
const unsigned int MAXIMUM_UPDATE_REQUESTS = 2
 Handles the use case when an update-request is received JUST before we process a sleep-request. More...
 

Function Documentation

const unsigned int Dali::Internal::Adaptor::anonymous_namespace{combined-update-render-controller.cpp}::DEFAULT_FRAME_DURATION_IN_MILLISECONDS ( DEFAULT_FRAME_DURATION_IN_SECONDS *  MILLISECONDS_PER_SECOND)

Referenced by Dali::Internal::Adaptor::CombinedUpdateRenderController::SetRenderRefreshRate().

Here is the caller graph for this function:

const unsigned int Dali::Internal::Adaptor::anonymous_namespace{combined-update-render-controller.cpp}::DEFAULT_FRAME_DURATION_IN_NANOSECONDS ( DEFAULT_FRAME_DURATION_IN_SECONDS *  NANOSECONDS_PER_SECOND)

Referenced by Dali::Internal::Adaptor::CombinedUpdateRenderController::SetRenderRefreshRate().

Here is the caller graph for this function:

const float Dali::Internal::Adaptor::anonymous_namespace{combined-update-render-controller.cpp}::DEFAULT_FRAME_DURATION_IN_SECONDS ( 1.0f/60.  0f)

Referenced by Dali::Internal::Adaptor::CombinedUpdateRenderController::SetRenderRefreshRate().

Here is the caller graph for this function:

const unsigned int Dali::Internal::Adaptor::anonymous_namespace{combined-update-render-controller.cpp}::MILLISECONDS_PER_SECOND ( 1e+  3)
const unsigned int Dali::Internal::Adaptor::anonymous_namespace{combined-update-render-controller.cpp}::NANOSECONDS_PER_MILLISECOND ( 1e+  6)

Referenced by Dali::Internal::Adaptor::CombinedUpdateRenderController::UpdateRenderThread().

Here is the caller graph for this function:

const unsigned int Dali::Internal::Adaptor::anonymous_namespace{combined-update-render-controller.cpp}::NANOSECONDS_PER_SECOND ( 1e+  9)
const float Dali::Internal::Adaptor::anonymous_namespace{combined-update-render-controller.cpp}::NANOSECONDS_TO_SECOND ( 1e-  9f)

Referenced by Dali::Internal::Adaptor::CombinedUpdateRenderController::UpdateRenderThread().

Here is the caller graph for this function:

Variable Documentation

const int Dali::Internal::Adaptor::anonymous_namespace{combined-update-render-controller.cpp}::CONTINUOUS = -1
const unsigned int Dali::Internal::Adaptor::anonymous_namespace{combined-update-render-controller.cpp}::CREATED_THREAD_COUNT = 1u
const unsigned int Dali::Internal::Adaptor::anonymous_namespace{combined-update-render-controller.cpp}::FALSE = 0u
const unsigned int Dali::Internal::Adaptor::anonymous_namespace{combined-update-render-controller.cpp}::MAXIMUM_UPDATE_REQUESTS = 2

Handles the use case when an update-request is received JUST before we process a sleep-request.

If we did not have an update-request count then there is a danger that, on the event-thread we could have: 1) An update-request where we do nothing as Update/Render thread still running. 2) Quickly followed by a sleep-request being handled where we pause the Update/Render Thread (even though we have an update to process).

Using a counter means we increment the counter on an update-request, and decrement it on a sleep-request. This handles the above scenario because: 1) MAIN THREAD: Update Request: COUNTER = 1 2) UPDATE/RENDER THREAD: Do Update/Render, then no Updates required -> Sleep Trigger 3) MAIN THREAD: Update Request: COUNTER = 2 4) MAIN THREAD: Sleep Request: COUNTER = 1 -> We do not sleep just yet

Also ensures we preserve battery life by only doing ONE update when the above use case is not triggered. 1) MAIN THREAD: Update Request: COUNTER = 1 2) UPDATE/RENDER THREAD: Do Update/Render, then no Updates required -> Sleep Trigger 3) MAIN THREAD: Sleep Request: COUNTER = 0 -> Go to sleep

Definition at line 78 of file combined-update-render-controller.cpp.

Referenced by Dali::Internal::Adaptor::CombinedUpdateRenderController::RequestUpdate().

const int Dali::Internal::Adaptor::anonymous_namespace{combined-update-render-controller.cpp}::ONCE = 1
const unsigned int Dali::Internal::Adaptor::anonymous_namespace{combined-update-render-controller.cpp}::TRUE = 1u
Dali Docs Home
Read more about Dali