Merge branch 'devel/master' into tizen
[platform/core/uifw/dali-adaptor.git] / dali / internal / window-system / common / display-connection.h
index bd6188f..1fb9008 100644 (file)
@@ -2,7 +2,7 @@
 #define DALI_INTERNAL_WINDOWSYSTEM_COMMON_DISPLAY_CONNECTION_H
 
 /*
- * Copyright (c) 2015 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2021 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.
 #include <dali/public-api/object/any.h>
 
 // INTERNAL INCLUDES
-#include <dali/integration-api/render-surface.h>
-
-#include <memory>
+#include <dali/integration-api/adaptor-framework/render-surface-interface.h>
+#include <dali/internal/graphics/common/graphics-interface.h>
 
 namespace Dali
 {
-
-class EglInterface;
-
 namespace Internal
 {
 namespace Adaptor
 {
 class DisplayConnection;
 }
-}
+} // namespace Internal
 
 class DisplayConnection
 {
 public:
-
   /**
    * @brief Create an initialized DisplayConnection.
    *
+   * @param[in] graphics The abstracted graphics interface
    * @return A handle to a newly allocated DisplayConnection resource.
    */
-  static DisplayConnection* New();
+  static DisplayConnection* New(Dali::Internal::Adaptor::GraphicsInterface& graphics);
 
   /**
    * @brief Create an initialized DisplayConnection.
    * Native surface will need this instead of DisplayConnection::New()
    *
+   * @param[in] graphics The abstracted graphics interface
    * @param[in] type Render surface type
    * @return A handle to a newly allocated DisplayConnection resource.
    */
-  static DisplayConnection* New( RenderSurface::Type type );
+  static DisplayConnection* New(Dali::Internal::Adaptor::GraphicsInterface& graphics, Dali::RenderSurfaceInterface::Type type);
 
   /**
    * @brief Create a DisplayConnection handle; this can be initialised with DisplayConnection::New().
@@ -81,26 +78,16 @@ public:
   Any GetDisplay();
 
   /**
-   * @brief Get DPI
-   * @param[out] dpiHorizontal set to the horizontal dpi
-   * @param[out] dpiVertical set to the vertical dpi
-   */
-  static void GetDpi(unsigned int& dpiHorizontal, unsigned int& dpiVertical);
-
-  /**
    * @brief Consumes any possible events on the queue so that there is no leaking between frames
    */
   void ConsumeEvents();
 
   /**
-   * @brief Initialize EGL display
-   *
-   * @param egl implementation to use for the creation
+   * @brief Initialize the display
    */
-  bool InitializeEgl(EglInterface& egl);
+  bool Initialize();
 
 public:
-
   /**
    * @brief This constructor is used by DisplayConnection New() methods.
    *
@@ -109,10 +96,9 @@ public:
   explicit DALI_INTERNAL DisplayConnection(Internal::Adaptor::DisplayConnection* impl);
 
 private:
-
   std::unique_ptr<Internal::Adaptor::DisplayConnection> mImpl;
 };
 
-}
+} // namespace Dali
 
 #endif // DALI_INTERNAL_WINDOWSYSTEM_COMMON_DISPLAY_CONNECTION_H