projects
/
platform
/
core
/
uifw
/
dali-adaptor.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
[4.0] PixelBuffer::Rotate() amendments.
[platform/core/uifw/dali-adaptor.git]
/
adaptors
/
ubuntu
/
vsync-monitor-ubuntu.cpp
diff --git
a/adaptors/ubuntu/vsync-monitor-ubuntu.cpp
b/adaptors/ubuntu/vsync-monitor-ubuntu.cpp
index
13592a7
..
af8d4c9
100644
(file)
--- a/
adaptors/ubuntu/vsync-monitor-ubuntu.cpp
+++ b/
adaptors/ubuntu/vsync-monitor-ubuntu.cpp
@@
-37,10
+37,9
@@
namespace Adaptor
namespace
{
namespace
{
-
-#if defined(DEBUG_ENABLED)
-Debug::Filter* gLogFilter = Debug::Filter::New(Debug::NoLogging, false, "LOG_VSYNC_MONITOR");
-#endif
+// constants to keep code readability with unsigned int has to be used as boolean (due to multithreading)
+const unsigned int TRUE = 1u;
+const unsigned int FALSE = 0u;
const int FD_NONE( -1 );
const int FD_NONE( -1 );
@@
-48,7
+47,8
@@
const int FD_NONE( -1 );
VSyncMonitor::VSyncMonitor()
: mFileDescriptor( FD_NONE ),
VSyncMonitor::VSyncMonitor()
: mFileDescriptor( FD_NONE ),
- mUseHardware( false )
+ mUseHardwareVSync( FALSE ),
+ mHardwareVSyncAvailable( FALSE )
{
}
{
}
@@
-57,9
+57,14
@@
VSyncMonitor::~VSyncMonitor()
Terminate();
}
Terminate();
}
-void VSyncMonitor::SetUseHardware( bool useHardware )
+void VSyncMonitor::SetUseHardwareVSync( bool useHardware )
+{
+ mUseHardwareVSync = useHardware;
+}
+
+void VSyncMonitor::SetHardwareVSyncAvailable( bool hardwareVSyncAvailable )
{
{
- m
UseHardware = useHardwar
e;
+ m
HardwareVSyncAvailable = hardwareVSyncAvailabl
e;
}
void VSyncMonitor::Initialize()
}
void VSyncMonitor::Initialize()
@@
-80,16
+85,11
@@
void VSyncMonitor::Initialize()
void VSyncMonitor::Terminate()
{
void VSyncMonitor::Terminate()
{
- if( mFileDescriptor != FD_NONE )
- {
- close( mFileDescriptor );
- mFileDescriptor = FD_NONE;
- }
}
bool VSyncMonitor::UseHardware()
{
}
bool VSyncMonitor::UseHardware()
{
- return mUseHardware && (FD_NONE != mFileDescriptor );
+ return mUseHardware
VSync && mHardwareVSyncAvailable
&& (FD_NONE != mFileDescriptor );
}
}