Revert "[Tizen] Revert "Support screen rotation""
[platform/core/uifw/dali-adaptor.git] / adaptors / devel-api / adaptor-framework / render-surface.h
index 61c4677..9739770 100644 (file)
@@ -2,7 +2,7 @@
 #define __DALI_RENDER_SURFACE_H__
 
 /*
- * Copyright (c) 2015 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2017 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.
@@ -31,6 +31,7 @@ namespace Dali
 
 class EglInterface;
 class DisplayConnection;
+class ThreadSynchronizationInterface;
 
 namespace Integration
 {
@@ -61,6 +62,13 @@ class RenderSurface
 {
 public:
 
+  enum Type
+  {
+    ECORE_RENDER_SURFACE,
+    WAYLAND_RENDER_SURFACE,
+    NATIVE_RENDER_SURFACE
+  };
+
   /**
    * @brief Constructor
    * Inlined as this is a pure abstract interface
@@ -126,19 +134,20 @@ public:
    * a surface to render onto.
    * @param[in] egl The Egl interface
    * @param[in] glAbstraction OpenGLES abstraction interface
+   * @param[in] resizingSurface True if the surface is being resized
    * @return True if the operation is successful, False if the operation failed
    */
-  virtual bool PreRender( EglInterface& egl, Integration::GlAbstraction& glAbstraction ) = 0;
+  virtual bool PreRender( EglInterface& egl, Integration::GlAbstraction& glAbstraction, bool resizingSurface ) = 0;
 
   /**
    * @brief Invoked by render thread after Core::Render
    * @param[in] egl The Egl interface
    * @param[in] glAbstraction OpenGLES abstraction interface
    * @param[in] displayConnection display connection
-   * @param[in] deltaTime Time (in microseconds) since PostRender was last called.
    * @param[in] replacingSurface True if the surface is being replaced.
+   * @param[in] resizingSurface True if the surface is being resized.
    */
-  virtual void PostRender( EglInterface& egl, Integration::GlAbstraction& glAbstraction, DisplayConnection* displayConnection, unsigned int deltaTime, bool replacingSurface ) = 0;
+  virtual void PostRender( EglInterface& egl, Integration::GlAbstraction& glAbstraction, DisplayConnection* displayConnection, bool replacingSurface, bool resizingSurface ) = 0;
 
   /**
    * @brief Invoked by render thread when the thread should be stop
@@ -150,6 +159,15 @@ public:
    */
   virtual void ReleaseLock() = 0;
 
+  /**
+   * @brief Sets the ThreadSynchronizationInterface
+   *
+   * @param threadSynchronization The thread-synchronization implementation.
+   */
+  virtual void SetThreadSynchronization( ThreadSynchronizationInterface& threadSynchronization ) = 0;
+
+  virtual RenderSurface::Type GetSurfaceType() = 0;
+
 private:
 
   /**