(PanGesture) Logging enabled via environment variable 33/19433/1
authorPaul Wisbey <p.wisbey@samsung.com>
Fri, 4 Apr 2014 14:35:33 +0000 (15:35 +0100)
committerVictor Cebollada <v.cebollada@samsung.com>
Fri, 11 Apr 2014 14:19:12 +0000 (15:19 +0100)
[Issue#]   N/A
[Problem]  Touch smootness etc. is hard to profile
[Cause]    No logging features available
[Solution] Added new environment variable, usage:

  DALI_LOG_PAN_GESTURE=1 your-app.exe

Change-Id: I96a78aca0838cd50d02365e952f10a0a74fd515f
Signed-off-by: Paul Wisbey <p.wisbey@samsung.com>
17 files changed:
dali/integration-api/file.list
dali/integration-api/profiling.cpp [new file with mode: 0644]
dali/integration-api/profiling.h [new file with mode: 0644]
dali/internal/common/core-impl.cpp
dali/internal/common/frame-time.cpp
dali/internal/common/frame-time.h
dali/internal/event/events/gesture-event-processor.cpp
dali/internal/event/events/gesture-event-processor.h
dali/internal/event/events/pan-gesture-processor.cpp
dali/internal/event/events/pan-gesture-processor.h
dali/internal/file.list
dali/internal/update/gestures/pan-gesture-profiling.cpp [new file with mode: 0644]
dali/internal/update/gestures/pan-gesture-profiling.h [new file with mode: 0644]
dali/internal/update/gestures/scene-graph-pan-gesture.cpp
dali/internal/update/gestures/scene-graph-pan-gesture.h
dali/internal/update/manager/update-manager.cpp
dali/internal/update/manager/update-manager.h

index 9d8866f..9b6d3c6 100644 (file)
@@ -5,6 +5,7 @@ platform_abstraction_src_files = \
    $(platform_abstraction_src_dir)/core.cpp \
    $(platform_abstraction_src_dir)/glyph-set.cpp \
    $(platform_abstraction_src_dir)/debug.cpp \
+   $(platform_abstraction_src_dir)/profiling.cpp \
    $(platform_abstraction_src_dir)/shader-data.cpp \
    $(platform_abstraction_src_dir)/system-overlay.cpp \
    $(platform_abstraction_src_dir)/common/lockless-buffer.cpp \
@@ -23,6 +24,7 @@ platform_abstraction_header_files = \
    $(platform_abstraction_src_dir)/core.h \
    $(platform_abstraction_src_dir)/glyph-set.h \
    $(platform_abstraction_src_dir)/debug.h \
+   $(platform_abstraction_src_dir)/profiling.h \
    $(platform_abstraction_src_dir)/bitmap.h \
    $(platform_abstraction_src_dir)/resource-types.h \
    $(platform_abstraction_src_dir)/resource-request.h \
diff --git a/dali/integration-api/profiling.cpp b/dali/integration-api/profiling.cpp
new file mode 100644 (file)
index 0000000..5642215
--- /dev/null
@@ -0,0 +1,54 @@
+//
+// Copyright (c) 2014 Samsung Electronics Co., Ltd.
+//
+// Licensed under the Flora License, Version 1.0 (the License);
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://floralicense.org/license/
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an AS IS BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+// CLASS HEADER
+#include <dali/integration-api/profiling.h>
+
+// INTERNAL INCLUDES
+#include <dali/internal/event/common/thread-local-storage.h>
+#include <dali/internal/event/events/gesture-event-processor.h>
+
+using Dali::Internal::GestureEventProcessor;
+using Dali::Internal::ThreadLocalStorage;
+
+namespace Dali
+{
+
+namespace Integration
+{
+
+void EnableProfiling( ProfilingType type )
+{
+  GestureEventProcessor& eventProcessor = ThreadLocalStorage::Get().GetGestureEventProcessor();
+
+  switch( type )
+  {
+    case PROFILING_TYPE_PAN_GESTURE:
+    {
+      eventProcessor.EnablePanGestureProfiling();
+    }
+
+    default:
+    {
+      // Do nothing
+      break;
+    }
+  }
+}
+
+} // namespace Integration
+
+} // namespace Dali
diff --git a/dali/integration-api/profiling.h b/dali/integration-api/profiling.h
new file mode 100644 (file)
index 0000000..e63adeb
--- /dev/null
@@ -0,0 +1,50 @@
+#ifndef __DALI_INTEGRATION_PROFILING_H__
+#define __DALI_INTEGRATION_PROFILING_H__
+
+//
+// Copyright (c) 2014 Samsung Electronics Co., Ltd.
+//
+// Licensed under the Flora License, Version 1.0 (the License);
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://floralicense.org/license/
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an AS IS BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+// EXTERNAL INCLUDES
+
+// INTERNAL INCLUDES
+#include <dali/public-api/common/dali-common.h>
+
+namespace Dali
+{
+
+namespace Integration
+{
+
+enum ProfilingType
+{
+  PROFILING_TYPE_PAN_GESTURE,
+
+  PROFILING_TYPE_END
+};
+
+/**
+ * Called by adaptor to provide profiling information.
+ *
+ * @pre Should be called after Core creation.
+ * @param type The type of profiling information to output.
+ */
+DALI_IMPORT_API void EnableProfiling( ProfilingType type );
+
+} // namespace Integration
+
+} // namespace Dali
+
+#endif // __DALI_INTEGRATION_PROFILING_H__
index 1a5cbb7..a4e5f45 100644 (file)
@@ -230,18 +230,18 @@ void Core::SetMinimumFrameTimeInterval(unsigned int interval)
 void Core::Update( UpdateStatus& status )
 {
   // get the last delta and the predict when this update will be rendered
-  float lastRenderDelta( 0.0f );
-  unsigned int lastRenderTime( 0 );
-  unsigned int nextRenderTime( 0 );
-  mFrameTime->PredictNextRenderTime( lastRenderDelta, lastRenderTime, nextRenderTime );
+  float lastFrameDelta( 0.0f );
+  unsigned int lastVSyncTime( 0 );
+  unsigned int nextVSyncTime( 0 );
+  mFrameTime->PredictNextVSyncTime( lastFrameDelta, lastVSyncTime, nextVSyncTime );
 
   // set the time delta so adaptor can easily print FPS with a release build with 0 as
   // it is cached by frametime
-  status.secondsFromLastFrame = lastRenderDelta;
+  status.secondsFromLastFrame = lastFrameDelta;
 
   // Render returns true when there are updates on the stage or one or more animations are completed.
   // Use the estimated time diff till we render as the elapsed time.
-  status.keepUpdating = mUpdateManager->Update( lastRenderDelta, lastRenderTime, nextRenderTime );
+  status.keepUpdating = mUpdateManager->Update( lastFrameDelta, lastVSyncTime, nextVSyncTime );
 
   // Check the Notification Manager message queue to set needsNotification
   status.needsNotification = mNotificationManager->MessagesToProcess();
index 22a817b..aa9d3ab 100644 (file)
@@ -139,7 +139,7 @@ void FrameTime::WakeUp()
   mRunning = true;
 }
 
-void FrameTime::PredictNextRenderTime( float& lastFrameDeltaSeconds, unsigned int& lastRenderTimeMilliseconds, unsigned int& nextRenderTimeMilliseconds )
+void FrameTime::PredictNextVSyncTime( float& lastFrameDeltaSeconds, unsigned int& lastVSyncTimeMilliseconds, unsigned int& nextVSyncTimeMilliseconds )
 {
   if ( mRunning )
   {
@@ -201,10 +201,10 @@ void FrameTime::PredictNextRenderTime( float& lastFrameDeltaSeconds, unsigned in
 
     // Set the input variables
     lastFrameDeltaSeconds = lastFrameDelta * MICROSECONDS_TO_SECONDS;
-    lastRenderTimeMilliseconds = lastVSyncTime / MICROSECONDS_PER_MILLISECOND;
-    nextRenderTimeMilliseconds = ( lastVSyncTime + timeTillNextRender ) / MICROSECONDS_PER_MILLISECOND;
+    lastVSyncTimeMilliseconds = lastVSyncTime / MICROSECONDS_PER_MILLISECOND;
+    nextVSyncTimeMilliseconds = ( lastVSyncTime + timeTillNextRender ) / MICROSECONDS_PER_MILLISECOND;
 
-    DALI_LOG_INFO( gLogFilter, Debug::General, "FrameTime: Frame: %u, Time: %u, NextTime: %u, LastDelta: %f\n", mLastUpdateFrameNumber, lastRenderTimeMilliseconds, nextRenderTimeMilliseconds, lastFrameDeltaSeconds );
+    DALI_LOG_INFO( gLogFilter, Debug::General, "FrameTime: Frame: %u, Time: %u, NextTime: %u, LastDelta: %f\n", mLastUpdateFrameNumber, lastVSyncTimeMilliseconds, nextVSyncTimeMilliseconds, lastFrameDeltaSeconds );
     DALI_LOG_INFO( gLogFilter, Debug::Verbose, "                      FramesInLastUpdate: %u, FramesTillNextVSync: %u\n", framesInLastUpdate, framesTillNextVSync );
   }
 }
index d7a259e..9c87ff0 100644 (file)
@@ -88,13 +88,13 @@ public: // Core Methods
   /**
    * Predicts when the next render time will occur.
    *
-   * @param[out]  lastFrameDeltaSeconds       The delta, in seconds (with float precision), between the last two renders.
-   * @param[out]  lastRenderTimeMilliseconds  The time, in milliseconds, of the last render.
-   * @param[out]  nextRenderTimeMilliseconds  The estimated time, in milliseconds, at the next render.
+   * @param[out]  lastFrameDeltaSeconds      The delta, in seconds (with float precision), between the last two renders.
+   * @param[out]  lastVSyncTimeMilliseconds  The time, in milliseconds, of the last VSync.
+   * @param[out]  nextVSyncTimeMilliseconds  The estimated time, in milliseconds, at the next VSync.
    *
    * @note Should only be called once per tick, from the update thread.
    */
-  void PredictNextRenderTime( float& lastFrameDeltaSeconds, unsigned int& lastRenderTimeMilliseconds, unsigned int& nextRenderTimeMilliseconds );
+  void PredictNextVSyncTime( float& lastFrameDeltaSeconds, unsigned int& lastVSyncTimeMilliseconds, unsigned int& nextVSyncTimeMilliseconds );
 
   // Called from VSync thread
 
index cfe7e58..a29f250 100644 (file)
@@ -239,6 +239,11 @@ bool GestureEventProcessor::NeedsUpdate()
   return updateRequired;
 }
 
+void GestureEventProcessor::EnablePanGestureProfiling()
+{
+  mPanGestureProcessor.EnableProfiling();
+}
+
 } // namespace Internal
 
 } // namespace Dali
index a3dc553..1ba7fa4 100644 (file)
@@ -116,6 +116,11 @@ public: // Called by Core
    */
   bool NeedsUpdate();
 
+  /**
+   * Called to provide pan-gesture profiling information.
+   */
+  void EnablePanGestureProfiling();
+
 private:
 
   // Undefined
index dc6fc2a..6995854 100644 (file)
@@ -417,6 +417,11 @@ void PanGestureProcessor::SetPanGestureProperties( const PanGesture& pan )
   }
 }
 
+void PanGestureProcessor::EnableProfiling()
+{
+  mSceneObject->EnableProfiling();
+}
+
 void PanGestureProcessor::UpdateDetection()
 {
   DALI_ASSERT_DEBUG(!mGestureDetectors.empty());
index 2479e06..ddbbdab 100644 (file)
@@ -107,6 +107,11 @@ public: // To be called by GestureEventProcessor
    */
   void SetPanGestureProperties( const PanGesture& pan );
 
+  /**
+   * Called to provide pan-gesture profiling information.
+   */
+  void EnableProfiling();
+
 private:
 
   // Undefined
index 46866bc..401b790 100644 (file)
@@ -184,6 +184,7 @@ internal_src_files = \
   $(internal_src_dir)/update/dynamics/scene-graph-dynamics-world.cpp \
   $(internal_src_dir)/update/modeling/internal-mesh-data.cpp \
   $(internal_src_dir)/update/modeling/scene-graph-animatable-mesh.cpp \
+  $(internal_src_dir)/update/gestures/pan-gesture-profiling.cpp \
   $(internal_src_dir)/update/gestures/scene-graph-pan-gesture.cpp \
   $(internal_src_dir)/update/modeling/scene-graph-material.cpp \
   $(internal_src_dir)/update/modeling/scene-graph-mesh.cpp \
diff --git a/dali/internal/update/gestures/pan-gesture-profiling.cpp b/dali/internal/update/gestures/pan-gesture-profiling.cpp
new file mode 100644 (file)
index 0000000..fed4c9e
--- /dev/null
@@ -0,0 +1,54 @@
+//
+// Copyright (c) 2014 Samsung Electronics Co., Ltd.
+//
+// Licensed under the Flora License, Version 1.0 (the License);
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://floralicense.org/license/
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an AS IS BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+// CLASS HEADER
+#include <dali/internal/update/gestures/pan-gesture-profiling.h>
+
+// INTERNAL INCLUDES
+#include <dali/integration-api/debug.h>
+
+namespace Dali
+{
+
+namespace Internal
+{
+
+void PanGestureProfiling::PrintData() const
+{
+  PrintData( mRawData,      "RAW" );
+  PrintData( mLatestData,   "LATEST" );
+  PrintData( mAveragedData, "AVERAGED" );
+}
+
+void PanGestureProfiling::PrintData( const PanPositionContainer& dataContainer, const char * const prefix ) const
+{
+  const PanPositionContainer::const_iterator endIter = dataContainer.end();
+  for ( PanPositionContainer::const_iterator iter = dataContainer.begin(); iter != endIter; ++iter )
+  {
+    DALI_LOG_UPDATE_STATUS( "%s, %u, %.2f, %.2f\n", prefix, iter->time, iter->position.x, iter->position.y );
+  }
+}
+
+void PanGestureProfiling::ClearData()
+{
+  mRawData.clear();
+  mLatestData.clear();
+  mAveragedData.clear();
+}
+
+} // namespace Internal
+
+} // namespace Dali
diff --git a/dali/internal/update/gestures/pan-gesture-profiling.h b/dali/internal/update/gestures/pan-gesture-profiling.h
new file mode 100644 (file)
index 0000000..beef37d
--- /dev/null
@@ -0,0 +1,63 @@
+#ifndef __DALI_INTERNAL_PAN_GESTURE_PROFILING_H__
+#define __DALI_INTERNAL_PAN_GESTURE_PROFILING_H__
+
+//
+// Copyright (c) 2014 Samsung Electronics Co., Ltd.
+//
+// Licensed under the Flora License, Version 1.0 (the License);
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://floralicense.org/license/
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an AS IS BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+// EXTERNAL INCLUDES
+#include <vector>
+
+// INTERNAL INCLUDES
+#include <dali/public-api/math/vector2.h>
+
+namespace Dali
+{
+
+namespace Internal
+{
+
+struct PanGestureProfiling
+{
+  struct Position
+  {
+    Position( unsigned int time, Vector2 position )
+    : time( time ), position( position )
+    {
+    }
+
+    unsigned int time;
+    Vector2 position;
+  };
+
+  typedef std::vector< PanGestureProfiling::Position > PanPositionContainer;
+
+  void PrintData() const;
+
+  void PrintData( const PanPositionContainer& dataContainer, const char * const prefix ) const;
+
+  void ClearData();
+
+  PanPositionContainer mRawData;
+  PanPositionContainer mLatestData;
+  PanPositionContainer mAveragedData;
+};
+
+
+} // namespace Internal
+
+} // namespace Dali
+
+#endif // __DALI_INTERNAL_PAN_GESTURE_PROFILING_H__
index 762480c..5de7928 100644 (file)
@@ -20,6 +20,7 @@
 // EXTERNAL INCLUDES
 
 // INTERNAL INCLUDES
+#include <dali/internal/update/gestures/pan-gesture-profiling.h>
 
 namespace Dali
 {
@@ -32,7 +33,12 @@ namespace SceneGraph
 
 namespace
 {
+
 const unsigned int ARRAY_SIZE( 4u );
+
+const unsigned int UPDATES_BETWEEN_PRINT( 120u );
+unsigned int UPDATE_COUNT( 0u );
+
 } // unnamed namespace
 
 PanGesture* PanGesture::New()
@@ -42,6 +48,7 @@ PanGesture* PanGesture::New()
 
 PanGesture::~PanGesture()
 {
+  delete mProfiling;
 }
 
 void PanGesture::AddGesture( const Dali::PanGesture& gesture )
@@ -54,7 +61,7 @@ void PanGesture::AddGesture( const Dali::PanGesture& gesture )
   mWritePosition %= ARRAY_SIZE;
 }
 
-void PanGesture::UpdateProperties( unsigned int nextRenderTime )
+void PanGesture::UpdateProperties( unsigned int lastVSyncTime, unsigned int nextVSyncTime )
 {
   unsigned int time( 0u );
   bool justStarted ( false );
@@ -66,6 +73,11 @@ void PanGesture::UpdateProperties( unsigned int nextRenderTime )
   {
     const PanInfo& currentGesture = mGestures[mReadPosition];
 
+    if( mProfiling )
+    {
+      mProfiling->mRawData.push_back( PanGestureProfiling::Position( currentGesture.time, currentGesture.screen.position ) );
+    }
+
     if ( currentGesture.time > time )
     {
       justStarted |= (currentGesture.state == Gesture::Started);
@@ -100,6 +112,11 @@ void PanGesture::UpdateProperties( unsigned int nextRenderTime )
   {
     PanInfo gesture(mLatestGesture);
 
+    if( mProfiling )
+    {
+      mProfiling->mLatestData.push_back( PanGestureProfiling::Position( lastVSyncTime, gesture.screen.position ) );
+    }
+
     if( !justStarted ) // only use previous frame if this is the continuing.
     {
       // If previous gesture exists, then produce position as 50/50 interpolated blend of these two points.
@@ -112,6 +129,11 @@ void PanGesture::UpdateProperties( unsigned int nextRenderTime )
       gesture.local.displacement -= mPreviousGesture.local.displacement;
     }
 
+    if( mProfiling )
+    {
+      mProfiling->mAveragedData.push_back( PanGestureProfiling::Position( lastVSyncTime, gesture.screen.position ) );
+    }
+
     mPreviousGesture = mLatestGesture;
 
     mScreenPosition.Set( gesture.screen.position );
@@ -121,6 +143,14 @@ void PanGesture::UpdateProperties( unsigned int nextRenderTime )
   }
 
   mInGesture &= ~justFinished;
+
+  if( mProfiling &&
+      UPDATE_COUNT++ >= UPDATES_BETWEEN_PRINT )
+  {
+    mProfiling->PrintData();
+    mProfiling->ClearData();
+    UPDATE_COUNT = 0u;
+  }
 }
 
 const GesturePropertyVector2& PanGesture::GetScreenPositionProperty() const
@@ -143,6 +173,14 @@ const GesturePropertyVector2& PanGesture::GetLocalDisplacementProperty() const
   return mLocalDisplacement;
 }
 
+void PanGesture::EnableProfiling()
+{
+  if( !mProfiling )
+  {
+    mProfiling = new PanGestureProfiling();
+  }
+}
+
 void PanGesture::ResetDefaultProperties( BufferIndex updateBufferIndex )
 {
   mScreenPosition.Reset();
@@ -155,7 +193,8 @@ PanGesture::PanGesture()
 : mGestures(),
   mWritePosition( 0 ),
   mReadPosition( 0 ),
-  mInGesture( false )
+  mInGesture( false ),
+  mProfiling( NULL )
 {
 }
 
index db6a648..b32e2f0 100644 (file)
@@ -31,6 +31,8 @@ struct PanGesture;
 namespace Internal
 {
 
+struct PanGestureProfiling;
+
 namespace SceneGraph
 {
 
@@ -59,9 +61,10 @@ public:
 
   /**
    * Called by the update manager so that we can update the value of our properties.
-   * @param[in]  nextRenderTime  The estimated time of the next render (in milliseconds).
+   * @param[in]  lastVSyncTime  The last VSync time (in milliseconds).
+   * @param[in]  nextVSyncTime  The estimated time of the next VSync (in milliseconds).
    */
-  virtual void UpdateProperties( unsigned int nextRenderTime );
+  virtual void UpdateProperties( unsigned int lastVSyncTime, unsigned int nextVSyncTime );
 
   /**
    * Retrieves a reference to the screen position property.
@@ -87,6 +90,11 @@ public:
    */
   const GesturePropertyVector2& GetLocalDisplacementProperty() const;
 
+  /**
+   * Called to provide pan-gesture profiling information.
+   */
+  void EnableProfiling();
+
 private:
 
   /**
@@ -224,6 +232,8 @@ private:
   PanInfo mLatestGesture;       ///< The latest gesture. (this update frame)
   PanInfo mPreviousGesture;     ///< The previous gesture. (one update frame ago)
   bool mInGesture;              ///< True if the gesture is currently being handled i.e. between Started <-> Finished/Cancelled
+
+  PanGestureProfiling* mProfiling; ///< NULL unless pan-gesture profiling information is required.
 };
 
 } // namespace SceneGraph
index 8ef61fa..61502af 100644 (file)
@@ -800,7 +800,7 @@ void UpdateManager::ResetProperties()
   PERF_MONITOR_END(PerformanceMonitor::RESET_PROPERTIES);
 }
 
-void UpdateManager::ProcessGestures( unsigned int nextRenderTime )
+void UpdateManager::ProcessGestures( unsigned int lastVSyncTime, unsigned int nextVSyncTime )
 {
   // constrain gestures... (in construction order)
   GestureContainer& gestures = mImpl->gestures;
@@ -808,7 +808,7 @@ void UpdateManager::ProcessGestures( unsigned int nextRenderTime )
   for ( GestureIter iter = gestures.Begin(), endIter = gestures.End(); iter != endIter; ++iter )
   {
     PanGesture& gesture = **iter;
-    gesture.UpdateProperties( nextRenderTime );
+    gesture.UpdateProperties( lastVSyncTime, nextVSyncTime );
   }
 }
 
@@ -1001,7 +1001,7 @@ void UpdateManager::PrepareMaterials( BufferIndex updateBufferIndex, MaterialCon
   }
 }
 
-unsigned int UpdateManager::Update( float elapsedSeconds, unsigned int lastRenderTime, unsigned int nextRenderTime )
+unsigned int UpdateManager::Update( float elapsedSeconds, unsigned int lastVSyncTime, unsigned int nextVSyncTime )
 {
   PERF_MONITOR_END(PerformanceMonitor::FRAME_RATE);   // Mark the End of the last frame
   PERF_MONITOR_NEXT_FRAME();             // Prints out performance info for the last frame (if enabled)
@@ -1048,7 +1048,7 @@ unsigned int UpdateManager::Update( float elapsedSeconds, unsigned int lastRende
   {
     // 6) Process Touches & Gestures
     mImpl->touchResampler.Update();
-    ProcessGestures( nextRenderTime );
+    ProcessGestures( lastVSyncTime, nextVSyncTime );
 
     // 7) Animate
     Animate( elapsedSeconds );
index c8cbaf2..50ea6c2 100644 (file)
@@ -354,11 +354,11 @@ public:
   /**
    * Performs an Update traversal on the scene-graph.
    * @param[in] elapsedSeconds The elapsed time that should be applied to animations.
-   * @param[in] lastRenderTime The last time, in milliseconds, that we rendered.
-   * @param[in] nextRenderTime The estimated time, in milliseconds, of the next render.
+   * @param[in] lastVSyncTime The last time, in milliseconds, that we had a VSync.
+   * @param[in] nextVSyncTime The estimated time, in milliseconds, of the next VSync.
    * @return True if further updates are required e.g. during animations.
    */
-  unsigned int Update( float elapsedSeconds, unsigned int lastRenderTime, unsigned int nextRenderTime );
+  unsigned int Update( float elapsedSeconds, unsigned int lastVSyncTime, unsigned int nextVSyncTime );
 
   /**
    * Set the background color i.e. the glClear color used at the beginning of each frame.
@@ -426,9 +426,10 @@ private:
 
   /**
    * Perform gesture updates.
-   * @param[in]  nextRenderTime  The estimated time of the next render.
+   * @param[in]  lastVSyncTime  The last VSync time.
+   * @param[in]  nextVSyncTime  The estimated time of the next VSync.
    */
-  void ProcessGestures( unsigned int nextRenderTime );
+  void ProcessGestures( unsigned int lastVSyncTime, unsigned int nextVSyncTime );
 
   /**
    * Perform animation updates