Added Adaptor::GetGraphicsDisplay() to get EglDisplay 26/188526/5
authorDavid Steele <david.steele@samsung.com>
Wed, 5 Sep 2018 15:10:21 +0000 (16:10 +0100)
committerDavid Steele <david.steele@samsung.com>
Fri, 7 Sep 2018 13:25:41 +0000 (14:25 +0100)
Change-Id: Ifc2c42db9f8b36326ad47fcd5508705eccd43909

dali/integration-api/adaptor.h
dali/internal/adaptor/common/adaptor-impl.cpp
dali/internal/adaptor/common/adaptor-impl.h
dali/internal/adaptor/common/adaptor.cpp

index 0925028..8044163 100755 (executable)
@@ -236,6 +236,13 @@ public:
   Any GetNativeWindowHandle();
 
   /**
+   * @brief Get the native display associated with the graphics backend
+   *
+   * @return A handle to the native display
+   */
+  Any GetGraphicsDisplay();
+
+  /**
    * @brief Release any locks the surface may hold.
    *
    * For example, after compositing an offscreen surface, use this method to allow
index e2df71d..98c9128 100755 (executable)
@@ -21,6 +21,7 @@
 // EXTERNAL INCLUDES
 #include <dali/public-api/common/stage.h>
 #include <dali/public-api/actors/layer.h>
+#include <dali/public-api/object/any.h>
 #include <dali/devel-api/actors/actor-devel.h>
 #include <dali/integration-api/debug.h>
 #include <dali/integration-api/core.h>
@@ -655,6 +656,22 @@ Any Adaptor::GetNativeWindowHandle()
   return mNativeWindow;
 }
 
+Any Adaptor::GetGraphicsDisplay()
+{
+  Any display;
+
+  if( mEglFactory )
+  {
+    EglInterface* egl = mEglFactory->GetImplementation();
+    if( egl )
+    {
+      auto eglImpl = static_cast<EglImplementation*>(egl);
+      display = eglImpl->GetDisplay();
+    }
+  }
+  return display;
+}
+
 void Adaptor::SetUseRemoteSurface(bool useRemoteSurface)
 {
   mUseRemoteSurface = useRemoteSurface;
index 1e4defe..53e9c43 100755 (executable)
@@ -290,6 +290,13 @@ public:
   Any GetNativeWindowHandle();
 
   /**
+   * Get the native display associated with the graphics backend
+   *
+   * @return A handle to the native display
+   */
+  Any GetGraphicsDisplay();
+
+  /**
    * Sets use remote surface for eglSurface output
    * @param[in] useRemoteSurface True if the remote surface is used
    */
index 6b40012..be113a7 100755 (executable)
@@ -113,6 +113,11 @@ Any Adaptor::GetNativeWindowHandle()
   return mImpl->GetNativeWindowHandle();
 }
 
+Any Adaptor::GetGraphicsDisplay()
+{
+  return mImpl->GetGraphicsDisplay();
+}
+
 void Adaptor::ReleaseSurfaceLock()
 {
   mImpl->ReleaseSurfaceLock();