Remove StereoMode
[platform/core/uifw/dali-adaptor.git] / dali / integration-api / render-surface.h
index 3db6bac..edb9022 100644 (file)
@@ -1,8 +1,8 @@
-#ifndef __DALI_RENDER_SURFACE_H__
-#define __DALI_RENDER_SURFACE_H__
+#ifndef DALI_RENDER_SURFACE_H
+#define DALI_RENDER_SURFACE_H
 
 /*
- * Copyright (c) 2017 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2018 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.
 // EXTERNAL INCLUDES
 #include <dali/public-api/math/rect.h>
 #include <dali/public-api/object/any.h>
-#include <dali/public-api/common/dali-common.h>
 #include <dali/public-api/common/view-mode.h>
 
 // INTERNAL INCLUDES
+#include <dali/public-api/dali-adaptor-common.h>
+
 
 namespace Dali
 {
 
-class EglInterface;
 class DisplayConnection;
 class ThreadSynchronizationInterface;
 
+namespace Internal
+{
+
+namespace Adaptor
+{
+
+class GraphicsInterface;
+
+} // namespace Adaptor
+
+} // namespace Internal
+
 namespace Integration
 {
 
@@ -88,40 +100,40 @@ public:
   virtual PositionSize GetPositionSize() const = 0;
 
   /**
-   * Initialize EGL, RenderSurface should create egl display and initialize
-   * @param egl implementation to use for the creation
+   * @brief Get DPI
+   * @param[out] dpiHorizontal set to the horizontal dpi
+   * @param[out] dpiVertical set to the vertical dpi
    */
-  virtual void InitializeEgl( EglInterface& egl ) = 0;
+  virtual void GetDpi( unsigned int& dpiHorizontal, unsigned int& dpiVertical ) = 0;
 
   /**
-   * @brief Creates EGL Surface
-   * @param egl implementation to use for the creation
+   * @brief InitializeGraphics the platform specific graphics surface interfaces
+   * @param[in] graphics The abstracted graphics interface
+   * @param[in] displayConnection The display connection interface
    */
-  virtual void CreateEglSurface( EglInterface& egl ) = 0;
+  virtual void InitializeGraphics( Dali::Internal::Adaptor::GraphicsInterface& graphics, Dali::DisplayConnection& displayConnection ) = 0;
 
   /**
-   * @brief Destroys EGL Surface
-   * @param egl implementation to use for the destruction
+   * @brief Creates the Surface
    */
-  virtual void DestroyEglSurface( EglInterface& egl ) = 0;
+  virtual void CreateSurface() = 0;
 
   /**
-   * @brief Replace the EGL Surface
-   * @param egl implementation to use for the creation
-   * @return true if context was lost
+   * @brief Destroys the Surface
    */
-  virtual bool ReplaceEGLSurface( EglInterface& egl ) = 0;
+  virtual void DestroySurface() = 0;
 
   /**
-   * @brief Resizes the underlying surface.
+   * @brief Replace the Surface
+   * @return true if context was lost
    */
-  virtual void MoveResize( Dali::PositionSize positionSize ) = 0;
+  virtual bool ReplaceGraphicsSurface() = 0;
 
   /**
-   * @brief Set the stereoscopic 3D view mode
-   * @param[in] viewMode The new view mode
+   * @brief Resizes the underlying surface.
+   * @param[in] The dimensions of the new position
    */
-  virtual void SetViewMode( ViewMode viewMode ) = 0;
+  virtual void MoveResize( Dali::PositionSize positionSize ) = 0;
 
   /**
    * @brief Called when Render thread has started
@@ -132,23 +144,18 @@ public:
    * @brief Invoked by render thread before Core::Render
    * If the operation fails, then Core::Render should not be called until there is
    * 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, bool resizingSurface ) = 0;
+  virtual bool PreRender( 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] renderToFbo True if render to FBO.
    * @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, bool resizingSurface ) = 0;
-
+  virtual void PostRender( bool renderToFbo, bool replacingSurface, bool resizingSurface ) = 0;
   /**
    * @brief Invoked by render thread when the thread should be stop
    */
@@ -186,4 +193,4 @@ private:
 
 } // namespace Dali
 
-#endif // __DALI_RENDER_SURFACE_H__
+#endif // DALI_RENDER_SURFACE_H