Revert "[Tizen] Revert "Support screen rotation""
[platform/core/uifw/dali-adaptor.git] / adaptors / devel-api / adaptor-framework / render-surface.h
index 2844105..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.
@@ -62,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
@@ -127,9 +134,10 @@ 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
@@ -137,8 +145,9 @@ public:
    * @param[in] glAbstraction OpenGLES abstraction interface
    * @param[in] displayConnection display connection
    * @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, 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
@@ -157,6 +166,8 @@ public:
    */
   virtual void SetThreadSynchronization( ThreadSynchronizationInterface& threadSynchronization ) = 0;
 
+  virtual RenderSurface::Type GetSurfaceType() = 0;
+
 private:
 
   /**