X-Git-Url: http://review.tizen.org/git/?a=blobdiff_plain;f=dali-toolkit%2Finternal%2Fcontrols%2Fsuper-blur-view%2Fsuper-blur-view-impl.cpp;h=9721dcfead357cd02cf989d5b1fbf1f8fdf72e05;hb=a827febe27e8131e681c24c255472bbbf097905f;hp=4e7427626c1d5088f74172bf163d596cd38ba771;hpb=22b6cdee7ed55d63eac35b64b304fc771052fcee;p=platform%2Fcore%2Fuifw%2Fdali-toolkit.git diff --git a/dali-toolkit/internal/controls/super-blur-view/super-blur-view-impl.cpp b/dali-toolkit/internal/controls/super-blur-view/super-blur-view-impl.cpp index 4e74276..9721dcf 100644 --- a/dali-toolkit/internal/controls/super-blur-view/super-blur-view-impl.cpp +++ b/dali-toolkit/internal/controls/super-blur-view/super-blur-view-impl.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2016 Samsung Electronics Co., Ltd. + * Copyright (c) 2017 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. @@ -30,6 +30,7 @@ #include // INTERNAL_INCLUDES +#include #include #include @@ -173,8 +174,7 @@ void SuperBlurView::SetImage(Image inputImage) Actor self( Self() ); mVisuals[0] = Toolkit::VisualFactory::Get().CreateVisual( mInputImage ); - RegisterVisual( 0, mVisuals[0] ); // Will clean up previously registered visuals for this index. - mVisuals[0].SetDepthIndex(0); + DevelControl::RegisterVisual( *this, 0, mVisuals[0], 0 ); // Will clean up previously registered visuals for this index. // custom shader is not applied on the original image. BlurImage( 0, inputImage); @@ -282,8 +282,7 @@ void SuperBlurView::OnSizeSet( const Vector3& targetSize ) GAUSSIAN_BLUR_RENDER_TARGET_PIXEL_FORMAT ); mVisuals[i] = Toolkit::VisualFactory::Get().CreateVisual( mBlurredImage[i - 1] ); - RegisterVisual( i, mVisuals[i] ); // Will clean up existing visual with same index. - mVisuals[i].SetDepthIndex( i ); + DevelControl::RegisterVisual( *this, i, mVisuals[i], int( i ) ); // Will clean up existing visual with same index. SetShaderEffect( mVisuals[i] ); } @@ -292,6 +291,8 @@ void SuperBlurView::OnSizeSet( const Vector3& targetSize ) SetImage( mInputImage ); } } + + Control::OnSizeSet( targetSize ); } void SuperBlurView::OnStageConnection( int depth ) @@ -301,7 +302,7 @@ void SuperBlurView::OnStageConnection( int depth ) return; } - // Chaining up first ensures visuals have SetOnStage called to create their renderers + // Exception to the rule, chaining up first ensures visuals have SetOnStage called to create their renderers Control::OnStageConnection( depth ); Actor self = Self(); @@ -310,6 +311,7 @@ void SuperBlurView::OnStageConnection( int depth ) // Note that the renderer indices are depending on the order they been added to the actor // which might be different from the blur level of its texture. // We can check the depth index of the renderer to know which blurred image it renders. + // All visuals WILL have renderers at this point as we are simply creating visuals with an Image handle. Renderer renderer = self.GetRendererAt( i ); int depthIndex = renderer.GetProperty(Renderer::Property::DEPTH_INDEX); if( depthIndex > 0 ) @@ -322,11 +324,6 @@ void SuperBlurView::OnStageConnection( int depth ) } } -void SuperBlurView::OnStageDisconnection( ) -{ - Control::OnStageDisconnection(); -} - Vector3 SuperBlurView::GetNaturalSize() { if( mInputImage )