Add Devel API to retrieve the RenderTaskList from Window 64/206764/1
authorRichard Huang <r.huang@samsung.com>
Thu, 23 May 2019 14:48:59 +0000 (15:48 +0100)
committerRichard Huang <r.huang@samsung.com>
Fri, 24 May 2019 10:20:14 +0000 (11:20 +0100)
Change-Id: I85e173d5f40f56cb47e565331492c59b46870cbd

dali/devel-api/adaptor-framework/window-devel.cpp
dali/devel-api/adaptor-framework/window-devel.h
dali/internal/window-system/common/window-impl.cpp
dali/internal/window-system/common/window-impl.h
dali/internal/window-system/common/window-render-surface.cpp

index 2496c21..17a2993 100644 (file)
@@ -35,6 +35,11 @@ void SetPositionSize( Window window, PositionSize positionSize )
   GetImplementation( window ).SetPositionSize( positionSize );
 }
 
+Dali::RenderTaskList GetRenderTaskList( Window window )
+{
+  return GetImplementation( window ).GetRenderTaskList();
+}
+
 Window Get( Actor actor )
 {
   return Internal::Adaptor::Window::Get( actor );
index e80e55a..bbdac10 100644 (file)
@@ -26,6 +26,7 @@ namespace Dali
 class KeyEvent;
 class TouchData;
 class WheelEvent;
+class RenderTaskList;
 
 namespace DevelWindow
 {
@@ -47,6 +48,14 @@ typedef Signal< void (const WheelEvent&) > WheelEventSignalType;   ///< Touched
 DALI_ADAPTOR_API void SetPositionSize( Window window, PositionSize positionSize );
 
 /**
+ * @brief Retrieves the list of render-tasks in the window.
+ *
+ * @param[in] window The window instance
+ * @return A valid handle to a RenderTaskList
+ */
+Dali::RenderTaskList GetRenderTaskList( Window window );
+
+/**
  * @brief Retrieve the window that the given actor is added to.
  *
  * @param[in] actor The actor
index 0ede554..568b79a 100644 (file)
@@ -20,7 +20,6 @@
 
 // EXTERNAL HEADERS
 #include <dali/integration-api/core.h>
-#include <dali/integration-api/render-task-list-integ.h>
 #include <dali/public-api/actors/actor.h>
 #include <dali/public-api/actors/layer.h>
 #include <dali/public-api/actors/camera-actor.h>
@@ -187,6 +186,11 @@ Dali::Layer Window::GetLayer( uint32_t depth ) const
   return mScene.GetLayer( depth );
 }
 
+Dali::RenderTaskList Window::GetRenderTaskList() const
+{
+  return mScene.GetRenderTaskList();
+}
+
 void Window::AddAvailableOrientation( Dali::Window::WindowOrientation orientation )
 {
   bool found = false;
index b4dd829..7fd04f9 100644 (file)
@@ -129,6 +129,11 @@ public:
   Dali::Layer GetLayer( uint32_t depth ) const;
 
   /**
+   * @copydoc Dali::DevelWindow::GetRenderTaskList()
+   */
+  Dali::RenderTaskList GetRenderTaskList() const;
+
+  /**
    * @copydoc Dali::Window::AddAvailableOrientation()
    */
   void AddAvailableOrientation(Dali::Window::WindowOrientation orientation);
index 04828cc..18ae128 100644 (file)
@@ -411,6 +411,12 @@ void WindowRenderSurface::PostRender( bool renderToFbo, bool replacingSurface, b
     {
       mRenderNotification->Trigger();
     }
+
+    if ( eglImpl.IsSurfacelessContextSupported() )
+    {
+      // Switch to the shared context after rendering this surface
+      eglImpl.MakeContextCurrent( EGL_NO_SURFACE, eglImpl.GetContext() );
+    }
   }
 }