Revert "Remove EGL surface in the update thread"
[platform/core/uifw/dali-adaptor.git] / dali / internal / system / common / thread-controller.h
index e4c3541..471a5f9 100644 (file)
@@ -1,8 +1,8 @@
-#ifndef __DALI_INTERNAL_THREAD_CONTROLLER_H__
-#define __DALI_INTERNAL_THREAD_CONTROLLER_H__
+#ifndef DALI_INTERNAL_THREAD_CONTROLLER_H
+#define DALI_INTERNAL_THREAD_CONTROLLER_H
 
 /*
- * Copyright (c) 2018 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2020 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.
@@ -25,7 +25,7 @@
 namespace Dali
 {
 
-class RenderSurface;
+class RenderSurfaceInterface;
 
 namespace Internal
 {
@@ -33,6 +33,8 @@ namespace Internal
 namespace Adaptor
 {
 
+enum class UpdateMode;
+
 class AdaptorInternalServices;
 class EnvironmentOptions;
 class ThreadControllerInterface;
@@ -97,15 +99,17 @@ public:
    * @brief Called by the adaptor when core requires one update
    *
    * @note If Adaptor is paused, we do one update/render only
+   *
+   * @param updateMode The update mode (i.e. either update and render, or update and upload without rendering)
    */
-  void RequestUpdateOnce();
+  void RequestUpdateOnce( UpdateMode updateMode );
 
   /**
    * @brief Replaces the surface.
    *
    * @param surface new surface
    */
-  void ReplaceSurface( RenderSurface* surface );
+  void ReplaceSurface( Dali::RenderSurfaceInterface* surface );
 
   /**
    * Resize the surface.
@@ -113,6 +117,11 @@ public:
   void ResizeSurface();
 
   /**
+   * Wait until the graphics is initialised.
+   */
+  void WaitForGraphicsInitialization();
+
+  /**
    * @copydoc Dali::Adaptor::SetRenderRefreshRate()
    */
   void SetRenderRefreshRate( unsigned int numberOfVSyncsPerRender );
@@ -122,6 +131,18 @@ public:
    */
   void SetPreRenderCallback( CallbackBase* callback );
 
+  /**
+   * @brief Adds the new surface.
+   *
+   * @param surface new surface
+   */
+  void AddSurface( Dali::RenderSurfaceInterface* surface );
+
+  /**
+   * @copydoc Dali::Adaptor::IsRenderingWindows()
+   */
+  bool IsRenderingWindows() const;
+
 private:
 
   // Undefined copy constructor.
@@ -141,4 +162,4 @@ private:
 
 } // namespace Dali
 
-#endif // __DALI_INTERNAL_THREAD_CONTROLLER_H__
+#endif // DALI_INTERNAL_THREAD_CONTROLLER_H