Changed 'virtual' function override declarations to 'override'.
[platform/core/uifw/dali-adaptor.git] / dali / internal / adaptor / common / combined-update-render-controller.h
index 54cc67d..6d0cb37 100644 (file)
@@ -80,7 +80,7 @@ public:
   /**
    * Constructor
    */
-  CombinedUpdateRenderController( AdaptorInternalServices& adaptorInterfaces, const EnvironmentOptions& environmentOptions );
+  CombinedUpdateRenderController( AdaptorInternalServices& adaptorInterfaces, const EnvironmentOptions& environmentOptions, ThreadMode threadMode );
 
   /**
    * Non virtual destructor. Not intended as base class.
@@ -90,62 +90,62 @@ public:
   /**
    * @copydoc ThreadControllerInterface::Initialize()
    */
-  virtual void Initialize();
+  void Initialize() override;
 
   /**
    * @copydoc ThreadControllerInterface::Start()
    */
-  virtual void Start();
+  void Start() override;
 
   /**
    * @copydoc ThreadControllerInterface::Pause()
    */
-  virtual void Pause();
+  void Pause() override;
 
   /**
    * @copydoc ThreadControllerInterface::Resume()
    */
-  virtual void Resume();
+  void Resume() override;
 
   /**
    * @copydoc ThreadControllerInterface::Stop()
    */
-  virtual void Stop();
+  void Stop() override;
 
   /**
    * @copydoc ThreadControllerInterface::RequestUpdate()
    */
-  virtual void RequestUpdate();
+  void RequestUpdate() override;
 
   /**
    * @copydoc ThreadControllerInterface::RequestUpdateOnce()
    */
-  virtual void RequestUpdateOnce( UpdateMode updateMode );
+  void RequestUpdateOnce( UpdateMode updateMode ) override;
 
   /**
    * @copydoc ThreadControllerInterface::ReplaceSurface()
    */
-  virtual void ReplaceSurface( Dali::RenderSurfaceInterface* surface );
+  void ReplaceSurface( Dali::RenderSurfaceInterface* surface ) override;
 
   /**
    * @copydoc ThreadControllerInterface::DeleteSurface()
    */
-  virtual void DeleteSurface( Dali::RenderSurfaceInterface* surface );
+  void DeleteSurface( Dali::RenderSurfaceInterface* surface ) override;
 
   /**
    * @copydoc ThreadControllerInterface::ResizeSurface()
    */
-  virtual void ResizeSurface();
+  void ResizeSurface() override;
 
   /**
    * @copydoc ThreadControllerInterface::WaitForGraphicsInitialization()
    */
-  virtual void WaitForGraphicsInitialization();
+  void WaitForGraphicsInitialization() override;
 
   /**
    * @copydoc ThreadControllerInterface::SetRenderRefreshRate()
    */
-  virtual void SetRenderRefreshRate( unsigned int numberOfFramesPerRender );
+  void SetRenderRefreshRate( unsigned int numberOfFramesPerRender ) override;
 
   /**
    * @copydoc ThreadControllerInterface::SetPreRenderCallback
@@ -155,7 +155,7 @@ public:
   /**
    * @copydoc ThreadControllerInterface::AddSurface()
    */
-  virtual void AddSurface( Dali::RenderSurfaceInterface* surface );
+  void AddSurface( Dali::RenderSurfaceInterface* surface ) override;
 
 private:
 
@@ -322,7 +322,7 @@ private:
   /**
    * @copydoc ThreadSynchronizationInterface::PostRenderComplete()
    */
-  virtual void PostRenderComplete();
+  void PostRenderComplete() override;
 
   /////////////////////////////////////////////////////////////////////////////////////////////////
   //// Called by the Render Thread if post-rendering is required
@@ -331,12 +331,12 @@ private:
   /**
    * @copydoc ThreadSynchronizationInterface::PostRenderStarted()
    */
-  virtual void PostRenderStarted();
+  void PostRenderStarted() override;
 
   /**
    * @copydoc ThreadSynchronizationInterface::PostRenderStarted()
    */
-  virtual void PostRenderWaitForCompletion();
+  void PostRenderWaitForCompletion() override;
 
 private:
 
@@ -367,6 +367,8 @@ private:
   unsigned int                      mUpdateRequestCount;               ///< Count of update-requests we have received to ensure we do not go to sleep too early.
   unsigned int                      mRunning;                          ///< Read and set on the event-thread only to state whether we are running.
 
+  ThreadMode                        mThreadMode;                       ///< Whether the thread runs continuously or runs when it is requested.
+
   //
   // NOTE: cannot use booleans as these are used from multiple threads, must use variable with machine word size for atomic read/write
   //
@@ -389,6 +391,8 @@ private:
   volatile unsigned int             mUploadWithoutRendering;           ///< Will be set to upload the resource only (with no rendering)
 
   volatile unsigned int             mFirstFrameAfterResume;            ///< Will be set to check the first frame after resume (for log)
+
+  std::vector<Rect<int>>            mDamagedRects;                     ///< Keeps collected damaged render items rects for one render pass
 };
 
 } // namespace Adaptor