+ if( mTargetSize != Vector2(targetSize) )
+ {
+ mTargetSize = Vector2(targetSize);
+
+ Actor self = Self();
+ for( unsigned int i = 1; i <= mBlurLevels; i++ )
+ {
+ float exponent = static_cast<float>(i);
+ mBlurredImage[i-1] = FrameBufferImage::New( mTargetSize.width/std::pow(2.f,exponent) , mTargetSize.height/std::pow(2.f,exponent),
+ 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 );
+ SetShaderEffect( mVisuals[i] );
+ }
+
+ if( mInputImage )
+ {
+ SetImage( mInputImage );
+ }
+ }
+
+ Control::OnSizeSet( targetSize );
+}
+
+void SuperBlurView::OnStageConnection( int depth )
+{
+ if( mTargetSize == Vector2::ZERO )
+ {
+ return;
+ }