Merge "Trace use scope macro instead of begin-end" into devel/master
[platform/core/uifw/dali-adaptor.git] / dali / internal / system / common / thread-controller.h
index 471a5f9..5f22a6a 100644 (file)
@@ -2,7 +2,7 @@
 #define DALI_INTERNAL_THREAD_CONTROLLER_H
 
 /*
- * Copyright (c) 2020 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2022 Samsung Electronics Co., Ltd.
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
 
 namespace Dali
 {
-
 class RenderSurfaceInterface;
 
 namespace Internal
 {
-
 namespace Adaptor
 {
-
 enum class UpdateMode;
+enum class ThreadMode;
 
 class AdaptorInternalServices;
 class EnvironmentOptions;
@@ -45,11 +43,10 @@ class ThreadControllerInterface;
 class ThreadController
 {
 public:
-
   /**
    * Constructor
    */
-  ThreadController( AdaptorInternalServices& adaptorInterfaces, const EnvironmentOptions& environmentOptions );
+  ThreadController(AdaptorInternalServices& adaptorInterfaces, const EnvironmentOptions& environmentOptions, ThreadMode threadMode);
 
   /**
    * Non virtual destructor. Not intended as base class.
@@ -102,14 +99,20 @@ public:
    *
    * @param updateMode The update mode (i.e. either update and render, or update and upload without rendering)
    */
-  void RequestUpdateOnce( UpdateMode updateMode );
+  void RequestUpdateOnce(UpdateMode updateMode);
 
   /**
    * @brief Replaces the surface.
    *
    * @param surface new surface
    */
-  void ReplaceSurface( Dali::RenderSurfaceInterface* surface );
+  void ReplaceSurface(Dali::RenderSurfaceInterface* surface);
+
+  /**
+   * Deletes the surface.
+   * @param surface The surface to be deleted
+   */
+  void DeleteSurface(Dali::RenderSurfaceInterface* surface);
 
   /**
    * Resize the surface.
@@ -124,35 +127,35 @@ public:
   /**
    * @copydoc Dali::Adaptor::SetRenderRefreshRate()
    */
-  void SetRenderRefreshRate( unsigned int numberOfVSyncsPerRender );
+  void SetRenderRefreshRate(unsigned int numberOfVSyncsPerRender);
 
   /**
    * @copydoc Dali::Adaptor::SetPreRenderCallback
    */
-  void SetPreRenderCallback( CallbackBase* callback );
+  void SetPreRenderCallback(CallbackBase* callback);
 
   /**
    * @brief Adds the new surface.
    *
    * @param surface new surface
    */
-  void AddSurface( Dali::RenderSurfaceInterface* surface );
+  void AddSurface(Dali::RenderSurfaceInterface* surface);
 
   /**
-   * @copydoc Dali::Adaptor::IsRenderingWindows()
+   * @brief Gets the thread id.
+   * @note If thread id getter doesn't supported, it will return 0 as default.
+   * @return The thread id.
    */
-  bool IsRenderingWindows() const;
+  int32_t GetThreadId() const;
 
 private:
-
   // Undefined copy constructor.
-  ThreadController( const ThreadController& ) = delete;
+  ThreadController(const ThreadController&) = delete;
 
   // Undefined assignment operator.
-  ThreadController& operator=( const ThreadController& ) = delete;
+  ThreadController& operator=(const ThreadController&) = delete;
 
 private:
-
   ThreadControllerInterface* mThreadControllerInterface;
 };