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 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.
35 class PlatformAbstraction;
37 } // namespace Integration
45 class VSyncMonitorInterface;
46 class UpdateRenderSynchronization;
47 class EnvironmentOptions;
48 class AdaptorInternalServices;
51 * Implements a simple class that monitors vertical blanks from libdrm
52 * and sends a notification to Core.
59 * Create the vsync notification thread; this will not start to monitor vsync and
60 * send notifications until Start() is called.
61 * @param[in] sync An object used to synchronize update, render and vsync threads.
62 * @param[in] adaptorInterfaces base adaptor interface
63 * @param[in] environmentOptions environment options
65 VSyncNotifier( UpdateRenderSynchronization& sync,
66 AdaptorInternalServices& adaptorInterfaces,
67 const EnvironmentOptions& environmentOptions);
70 * Non-virtual destructor; VSyncNotifier is not suitable as a base class.
87 * The main thread loop. The system thread will be destroyed on
88 * exit from this function.
94 UpdateRenderSynchronization& mUpdateRenderSync; ///< Used to synchronize the update, render & vsync threads
95 Dali::Integration::Core& mCore; ///< Dali core reference
96 Integration::PlatformAbstraction& mPlatformAbstraction; ///< The platform abstraction for retrieving the current time etc.
97 VSyncMonitorInterface* mVSyncMonitor; ///< VSyncMonitor interface
98 boost::thread* mThread; ///< The actual thread.
99 const EnvironmentOptions& mEnvironmentOptions; ///< Environment options
101 }; // class VSyncNotifier
103 } // namespace Adaptor
105 } // namespace Internal
109 #endif // __DALI_INTERNAL_VSYNC_NOTIFIER_H__