1 #ifndef __DALI_INTERNAL_VSYNC_MONITOR_IMPL_H__
2 #define __DALI_INTERNAL_VSYNC_MONITOR_IMPL_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.
25 #include <base/interfaces/vsync-monitor-interface.h>
37 * Tizen interface for monitoring VSync
39 class VSyncMonitor : public VSyncMonitorInterface
50 virtual ~VSyncMonitor();
55 * Set the use hardware flag
56 * @param[in] useHardware The new state for the use hardware flag.
58 void SetUseHardware( bool useHardware );
60 private: // From Dali::Internal::Adaptor::VSyncMonitorInterface
63 * copydoc Dali::Internal::Adaptor::VSyncMonitorInterface::Initialize
65 virtual void Initialize();
68 * copydoc Dali::Internal::Adaptor::VSyncMonitorInterface::Terminate
70 virtual void Terminate();
73 * copydoc Dali::Internal::Adaptor::VSyncMonitorInterface::UseHardware
75 virtual bool UseHardware();
78 * copydoc Dali::Internal::Adaptor::VSyncMonitorInterface::DoSync
80 virtual bool DoSync( unsigned int& frameNumber, unsigned int& seconds, unsigned int& microseconds );
84 int mFileDescriptor; ///< DRM dev node file descriptor
85 drmVBlank mVBlankInfo;
86 bool mUseHardware; ///< Hardware VSyncs available flag
90 } // namespace Adaptor
92 } // namespace Internal
96 #endif // __DALI_INTERNAL_VSYNC_MONITOR_IMPL_H__