1 #ifndef __DALI_INTERNAL_VSYNC_NOTIFIER_H__
2 #define __DALI_INTERNAL_VSYNC_NOTIFIER_H__
5 // Copyright (c) 2014 Samsung Electronics Co., Ltd.
7 // Licensed under the Flora License, Version 1.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://floralicense.org/license/
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.
34 class PlatformAbstraction;
36 } // namespace Integration
44 class VSyncMonitorInterface;
45 class UpdateRenderSynchronization;
46 class EnvironmentOptions;
47 class AdaptorInternalServices;
50 * Implements a simple class that monitors vertical blanks from libdrm
51 * and sends a notification to Core.
58 * Create the vsync notification thread; this will not start to monitor vsync and
59 * send notifications until Start() is called.
60 * @param[in] sync An object used to synchronize update, render and vsync threads.
61 * @param[in] adaptorInterfaces base adaptor interface
62 * @param[in] environmentOptions environment options
64 VSyncNotifier( UpdateRenderSynchronization& sync,
65 AdaptorInternalServices& adaptorInterfaces,
66 const EnvironmentOptions& environmentOptions);
69 * Non-virtual destructor; VSyncNotifier is not suitable as a base class.
86 * The main thread loop. The system thread will be destroyed on
87 * exit from this function.
93 UpdateRenderSynchronization& mUpdateRenderSync; ///< Used to synchronize the update, render & vsync threads
94 Dali::Integration::Core& mCore; ///< Dali core reference
95 Integration::PlatformAbstraction& mPlatformAbstraction; ///< The platform abstraction for retrieving the current time etc.
96 VSyncMonitorInterface* mVSyncMonitor; ///< VSyncMonitor interface
97 boost::thread* mThread; ///< The actual thread.
98 const EnvironmentOptions& mEnvironmentOptions; ///< Environment options
100 }; // class VSyncNotifier
102 } // namespace Adaptor
104 } // namespace Internal
108 #endif // __DALI_INTERNAL_VSYNC_NOTIFIER_H__