Extract out RenderRequest & common Render functions from RenderThread source files
[platform/core/uifw/dali-adaptor.git] / adaptors / base / thread-synchronization.h
index eea45c7..54f1f31 100644 (file)
  */
 
 // EXTERNAL INCLUDES
+#include <dali/devel-api/threading/conditional-wait.h>
 
 // INTERNAL INCLUDES
 #include <integration-api/thread-synchronization-interface.h>
 #include <base/interfaces/performance-interface.h>
-#include <base/conditional-wait.h>
 #include <trigger-event-interface.h>
 #include <base/frame-time.h>
-#include <base/render-thread.h>
+#include <base/render-request.h>
 
 namespace Dali
 {
@@ -177,6 +177,13 @@ public:
   bool RenderReady( RenderRequest*& request );
 
   /**
+   * Called by the render thread after it renders a frame.
+   * Used to notify the update-thread that a frame has been rendered.
+   * @pre Called by render thread only.
+   */
+  void RenderFinished();
+
+  /**
    * Called by the Render thread to inform the synchronization class that the surface has been replaced.
    *
    * @note Should only be called by the Render thread.
@@ -411,7 +418,7 @@ private:
   volatile unsigned int mRenderThreadStop;            ///< Whether the render-thread should be stopped (set by the update-thread, read by the render-thread).
   volatile unsigned int mRenderThreadReplacingSurface;///< Whether the render-thread should replace the surface (set by the event & render threads, read by the render-thread).
 
-  volatile unsigned int mRenderThreadSurfaceRendered; ///< Whether the render-surface has rendered our surface (set by the event & render threads, read by the render-thread).
+  volatile unsigned int mRenderThreadPostRendering;   ///< Whether post-rendering is taking place (set by the event & render threads, read by the render-thread).
 
   volatile unsigned int mEventThreadSurfaceReplaced;  ///< Checked by the event-thread & set by the render-thread when the surface has been replaced (set by the event & render threads, read by the event-thread).