+
+ if( mInputImage )
+ {
+ SetImage( mInputImage );
+ }
+
+ if( self.OnStage() )
+ {
+ for( unsigned int i = 1; i <= mBlurLevels; i++ )
+ {
+ mVisuals[i].SetOnStage( self );
+ }
+ }
+ }
+}
+
+void SuperBlurView::OnStageConnection( int depth )
+{
+ Control::OnStageConnection( depth );
+
+ if( mTargetSize == Vector2::ZERO )
+ {
+ return;
+ }
+
+ Actor self = Self();
+ if( mVisuals[0] )
+ {
+ mVisuals[0].SetOnStage( self );
+ }
+ for(unsigned int i=1; i<=mBlurLevels;i++)
+ {
+ if( mVisuals[i] )
+ {
+ mVisuals[i].SetOnStage( self );
+ }
+
+ Renderer renderer = self.GetRendererAt( i );
+ Property::Index index = renderer.RegisterProperty( ALPHA_UNIFORM_NAME, 0.f );
+ Constraint constraint = Constraint::New<float>( renderer, index, ActorOpacityConstraint(mBlurLevels, i-1) );
+ constraint.AddSource( Source( self, mBlurStrengthPropertyIndex ) );
+ constraint.Apply();
+ }
+}
+
+void SuperBlurView::OnStageDisconnection( )
+{
+ if( mTargetSize == Vector2::ZERO )
+ {
+ return;
+ }
+
+ Actor self = Self();
+ for(unsigned int i=0; i<mBlurLevels+1;i++)
+ {
+ mVisuals[i].SetOffStage( self );
+ }
+
+ Control::OnStageDisconnection();
+}
+
+Vector3 SuperBlurView::GetNaturalSize()
+{
+ if( mInputImage )
+ {
+ return Vector3( mInputImage.GetWidth(), mInputImage.GetHeight(), 0.f );