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

Implements a simple class that either monitors vertical blanks from libdrm, or manages a software timer to handle syncing. More...

#include <vsync-notifier.h>

Collaboration diagram for Dali::Internal::Adaptor::VSyncNotifier:
Collaboration graph
[legend]

Public Member Functions

 VSyncNotifier (ThreadSynchronization &sync, AdaptorInternalServices &adaptorInterfaces, const EnvironmentOptions &environmentOptions)
 Create the vsync notification thread; this will not start to monitor vsync and send notifications until Start() is called. More...
 
 ~VSyncNotifier ()
 Non-virtual destructor; VSyncNotifier is not suitable as a base class. More...
 
void Start ()
 Starts the thread. More...
 
void Stop ()
 Stops the thread. More...
 

Private Member Functions

void Run ()
 The main thread loop. More...
 

Static Private Member Functions

static void * InternalThreadEntryFunc (void *This)
 Helper for the thread calling the entry function. More...
 

Private Attributes

ThreadSynchronizationmThreadSynchronization
 Used to synchronize all the threads. More...
 
Dali::Integration::CoremCore
 Dali core reference. More...
 
VSyncMonitorInterfacemVSyncMonitor
 VSyncMonitor interface. More...
 
pthread_t * mThread
 The actual thread. More...
 
const EnvironmentOptionsmEnvironmentOptions
 Environment options. More...
 
unsigned int mNumberOfVSyncsPerRender
 How many frames for each update/render cycle. More...
 

Detailed Description

Implements a simple class that either monitors vertical blanks from libdrm, or manages a software timer to handle syncing.

Definition at line 50 of file vsync-notifier.h.

Constructor & Destructor Documentation

Dali::Internal::Adaptor::VSyncNotifier::VSyncNotifier ( ThreadSynchronization sync,
AdaptorInternalServices adaptorInterfaces,
const EnvironmentOptions environmentOptions 
)

Create the vsync notification thread; this will not start to monitor vsync and send notifications until Start() is called.

Parameters
[in]syncAn object used to synchronize update, render and vsync threads.
[in]adaptorInterfacesbase adaptor interface
[in]environmentOptionsenvironment options

Definition at line 55 of file vsync-notifier.cpp.

Dali::Internal::Adaptor::VSyncNotifier::~VSyncNotifier ( )

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

Definition at line 67 of file vsync-notifier.cpp.

References DALI_LOG_INFO, and Stop().

Here is the call graph for this function:

Member Function Documentation

static void* Dali::Internal::Adaptor::VSyncNotifier::InternalThreadEntryFunc ( void *  This)
inlinestaticprivate

Helper for the thread calling the entry function.

Parameters
[in]ThisA pointer to the current VSyncNotifier object

Definition at line 92 of file vsync-notifier.h.

Referenced by Start().

Here is the caller graph for this function:

void Dali::Internal::Adaptor::VSyncNotifier::Run ( )
private
void Dali::Internal::Adaptor::VSyncNotifier::Start ( )

Starts the thread.

Definition at line 74 of file vsync-notifier.cpp.

References DALI_ASSERT_ALWAYS, DALI_LOG_INFO, Dali::Internal::Adaptor::VSyncMonitorInterface::Initialize(), InternalThreadEntryFunc(), mThread, and mVSyncMonitor.

Referenced by Dali::Internal::Adaptor::SeparateUpdateRenderController::Initialize().

Here is the call graph for this function:

Here is the caller graph for this function:

void Dali::Internal::Adaptor::VSyncNotifier::Stop ( )

Stops the thread.

Definition at line 88 of file vsync-notifier.cpp.

References DALI_LOG_INFO, mThread, mVSyncMonitor, and Dali::Internal::Adaptor::VSyncMonitorInterface::Terminate().

Referenced by Dali::Internal::Adaptor::SeparateUpdateRenderController::Stop(), and ~VSyncNotifier().

Here is the call graph for this function:

Here is the caller graph for this function:

Member Data Documentation

Dali::Integration::Core& Dali::Internal::Adaptor::VSyncNotifier::mCore
private

Dali core reference.

Definition at line 101 of file vsync-notifier.h.

const EnvironmentOptions& Dali::Internal::Adaptor::VSyncNotifier::mEnvironmentOptions
private

Environment options.

Definition at line 104 of file vsync-notifier.h.

Referenced by Run().

unsigned int Dali::Internal::Adaptor::VSyncNotifier::mNumberOfVSyncsPerRender
private

How many frames for each update/render cycle.

Definition at line 105 of file vsync-notifier.h.

Referenced by Run().

pthread_t* Dali::Internal::Adaptor::VSyncNotifier::mThread
private

The actual thread.

Definition at line 103 of file vsync-notifier.h.

Referenced by Start(), and Stop().

ThreadSynchronization& Dali::Internal::Adaptor::VSyncNotifier::mThreadSynchronization
private

Used to synchronize all the threads.

Definition at line 100 of file vsync-notifier.h.

Referenced by Run().

VSyncMonitorInterface* Dali::Internal::Adaptor::VSyncNotifier::mVSyncMonitor
private

VSyncMonitor interface.

Definition at line 102 of file vsync-notifier.h.

Referenced by Run(), Start(), and Stop().


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