From abbc04765d079c17434af902f22eaffb2bab1a7b Mon Sep 17 00:00:00 2001 From: Richard Huang Date: Mon, 22 Oct 2018 17:33:58 +0100 Subject: [PATCH] Overlay RenderTaskList should be created by the Window instead of the Overlay Change-Id: I9108f1d79e1989ddf648a930a0cd315f0f4c6d0b --- dali/internal/window-system/common/window-impl.cpp | 17 ++++++++++++++--- 1 file changed, 14 insertions(+), 3 deletions(-) diff --git a/dali/internal/window-system/common/window-impl.cpp b/dali/internal/window-system/common/window-impl.cpp index 4e414ba6..8412d53 100644 --- a/dali/internal/window-system/common/window-impl.cpp +++ b/dali/internal/window-system/common/window-impl.cpp @@ -21,6 +21,8 @@ // EXTERNAL HEADERS #include #include +#include +#include #include #include #include @@ -144,13 +146,22 @@ void Window::SetAdaptor(Dali::Adaptor& adaptor) DALI_ASSERT_ALWAYS( !mStarted && "Adaptor already started" ); mStarted = true; - // Only create one overlay per window + // Create one overlay for the main window only Internal::Adaptor::Adaptor& adaptorImpl = Internal::Adaptor::Adaptor::GetImplementation(adaptor); Integration::Core& core = adaptorImpl.GetCore(); mOverlay = &core.GetSystemOverlay(); - Dali::RenderTaskList taskList = mOverlay->GetOverlayRenderTasks(); - taskList.CreateTask(); + // Only create render task list for the overlay once + if (!mOverlay->GetOverlayRenderTasks()) + { + Dali::RenderTaskList overlayRenderTaskList = Integration::RenderTaskList::New(); + + Dali::Actor overlayRootActor = mOverlay->GetDefaultRootActor(); + Dali::CameraActor overlayCameraActor = mOverlay->GetDefaultCameraActor(); + Integration::RenderTaskList::CreateTask( overlayRenderTaskList, overlayRootActor, overlayCameraActor ); + + mOverlay->SetOverlayRenderTasks( overlayRenderTaskList ); + } mAdaptor = &adaptorImpl; mAdaptor->AddObserver( *this ); -- 2.7.4