From 7d7006623dc5520280ceebd56c102aa76f121c3d Mon Sep 17 00:00:00 2001 From: "Seungho, Baek" Date: Mon, 16 Mar 2020 16:33:20 +0900 Subject: [PATCH 1/1] Unparents internalRoot actor when gaussian-blur-view is deactived. - After gaussian-blur-view is once activated, Renderers of internalRoot actor are remained. When the gaussian-blur-view become deactived, internalRoot is still child of the View, and, the renderers of internalRoot will be renderered. - So, to add the internalRoot to gaussian-blur-view when it is actived and to unparent the internalRoot when the view become deactived, make the renderers do not affect rendering results. Change-Id: If147583d008662335c539b0e016abeb67e0a9679 Signed-off-by: Seungho, Baek --- automated-tests/src/dali-toolkit/utc-Dali-GaussianBlurView.cpp | 3 +++ .../internal/controls/gaussian-blur-view/gaussian-blur-view-impl.cpp | 3 ++- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/automated-tests/src/dali-toolkit/utc-Dali-GaussianBlurView.cpp b/automated-tests/src/dali-toolkit/utc-Dali-GaussianBlurView.cpp index 4a19b78..531b94c 100644 --- a/automated-tests/src/dali-toolkit/utc-Dali-GaussianBlurView.cpp +++ b/automated-tests/src/dali-toolkit/utc-Dali-GaussianBlurView.cpp @@ -178,11 +178,14 @@ int UtcDaliGaussianBlurActivateDeactivate(void) RenderTaskList taskList2 = Stage::GetCurrent().GetRenderTaskList(); DALI_TEST_CHECK( 1u != taskList2.GetTaskCount() ); + DALI_TEST_CHECK( 2u == view.GetChildCount() ); view.Deactivate(); RenderTaskList taskList3 = Stage::GetCurrent().GetRenderTaskList(); DALI_TEST_CHECK( 1u == taskList3.GetTaskCount() ); + DALI_TEST_CHECK( 1u == view.GetChildCount() ); + END_TEST; } diff --git a/dali-toolkit/internal/controls/gaussian-blur-view/gaussian-blur-view-impl.cpp b/dali-toolkit/internal/controls/gaussian-blur-view/gaussian-blur-view-impl.cpp index d83ed24..233a79c 100644 --- a/dali-toolkit/internal/controls/gaussian-blur-view/gaussian-blur-view-impl.cpp +++ b/dali-toolkit/internal/controls/gaussian-blur-view/gaussian-blur-view-impl.cpp @@ -330,7 +330,6 @@ void GaussianBlurView::OnInitialize() ////////////////////////////////////////////////////// // Connect to actor tree Self().Add( mChildrenRoot ); - Self().Add( mInternalRoot ); mInternalRoot.Add( mHorizBlurActor ); mInternalRoot.Add( mVertBlurActor ); mInternalRoot.Add( mRenderDownsampledCamera ); @@ -534,6 +533,7 @@ void GaussianBlurView::RemoveRenderTasks() void GaussianBlurView::Activate() { // make sure resources are allocated and start the render tasks processing + Self().Add( mInternalRoot ); AllocateResources(); CreateRenderTasks(); mActivated = true; @@ -550,6 +550,7 @@ void GaussianBlurView::Deactivate() { // stop render tasks processing // Note: render target resources are automatically freed since we set the Image::Unused flag + mInternalRoot.Unparent(); RemoveRenderTasks(); mRenderTargetForRenderingChildren.Reset(); mRenderTarget1.Reset(); -- 2.7.4