Suspend window deletion while rendering
[platform/core/uifw/dali-adaptor.git] / dali / internal / system / common / thread-controller.h
index 8e13370..471a5f9 100644 (file)
@@ -2,7 +2,7 @@
 #define DALI_INTERNAL_THREAD_CONTROLLER_H
 
 /*
- * Copyright (c) 2019 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.
@@ -33,6 +33,8 @@ namespace Internal
 namespace Adaptor
 {
 
+enum class UpdateMode;
+
 class AdaptorInternalServices;
 class EnvironmentOptions;
 class ThreadControllerInterface;
@@ -97,8 +99,10 @@ 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.
@@ -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.