From f6256f1accdb5f80d973d4c33f52991ef2b6c905 Mon Sep 17 00:00:00 2001 From: Kimmo Hoikka Date: Thu, 8 Oct 2015 05:27:34 -0700 Subject: [PATCH] Revert "Fix for thread contention issues in FrameTime object." This reverts commit 9a878f148492cd20ea41a4111848bebaa71ff0e9. Change-Id: I1cbe562e27460cf84f421cad7daf6680853dd5fc --- adaptors/base/frame-time.cpp | 3 --- adaptors/base/frame-time.h | 8 +++----- 2 files changed, 3 insertions(+), 8 deletions(-) diff --git a/adaptors/base/frame-time.cpp b/adaptors/base/frame-time.cpp index c8031a6..025a6a7 100644 --- a/adaptors/base/frame-time.cpp +++ b/adaptors/base/frame-time.cpp @@ -88,7 +88,6 @@ void FrameTime::SetMinimumFrameTimeInterval( unsigned int interval ) void FrameTime::SetSyncTime( unsigned int frameNumber ) { - Dali::Mutex::ScopedLock lock( mMutex ); // Only set the render time if we are running if ( mRunning ) { @@ -102,7 +101,6 @@ void FrameTime::SetSyncTime( unsigned int frameNumber ) void FrameTime::Suspend() { - Dali::Mutex::ScopedLock lock( mMutex ); mRunning = FALSE; // Reset members @@ -150,7 +148,6 @@ void FrameTime::WakeUp() void FrameTime::PredictNextSyncTime( float& lastFrameDeltaSeconds, unsigned int& lastSyncTimeMilliseconds, unsigned int& nextSyncTimeMilliseconds ) { - Dali::Mutex::ScopedLock lock( mMutex ); if ( mRunning ) { const unsigned int minimumFrameTimeInterval( mMinimumFrameTimeInterval ); diff --git a/adaptors/base/frame-time.h b/adaptors/base/frame-time.h index c3cb363..42bc596 100644 --- a/adaptors/base/frame-time.h +++ b/adaptors/base/frame-time.h @@ -20,7 +20,6 @@ // EXTERNAL INCLUDES #include -#include namespace Dali { @@ -119,21 +118,20 @@ private: unsigned int mMinimumFrameTimeInterval; ///< The minimum frame time interval, set by Adaptor. - volatile uint64_t mLastSyncTime; ///< The last Sync time (in microseconds). - volatile uint64_t mLastSyncTimeAtUpdate; ///< The last Sync time at Update (in microseconds). + uint64_t mLastSyncTime; ///< The last Sync time (in microseconds). + uint64_t mLastSyncTimeAtUpdate; ///< The last Sync time at Update (in microseconds). unsigned int mLastSyncFrameNumber; ///< The last Sync frame number unsigned int mLastUpdateFrameNumber; ///< The last Sync frame number handled in Update. // NOTE cannot use bitfields or booleans as these are used from multiple threads, must use variable with machine word size for atomic read/write - volatile unsigned int mRunning; ///< The state of the FrameTime object. + unsigned int mRunning; ///< The state of the FrameTime object. unsigned int mFirstFrame; ///< Whether the current update is the first frame (after initialisation, resume or wake up). unsigned int mPreviousUpdateFrames[3]; ///< Array holding the number of frames Update took in the last three iterations. unsigned int writePos; ///< The current write position in the array. unsigned int mExtraUpdatesSinceSync; ///< The number of extra updates since the last Sync. - Dali::Mutex mMutex; ///< Mutex to ensure correct access locking. }; } // namespace Adaptor -- 2.7.4