+ mRootLayer->SetSize( mSize.width, mSize.height );
+
+ // Repeat for SystemOverlay actors
+ if( mSystemOverlay )
+ {
+ // Note that the SystemOverlay has a separate camera, configured for the full surface-size.
+ // This will remain unaffected by changes in SetDefaultCameraPosition()
+ mSystemOverlay->GetImpl()->SetSize( width, height );
+ }
+
+ SetDefaultSurfaceRectMessage( mUpdateManager, Rect<int>( 0, 0, width, height ) );
+
+ // if single render task to screen then set its viewport parameters
+ if( 1 == mRenderTaskList->GetTaskCount() )
+ {
+ Dali::RenderTask defaultRenderTask = mRenderTaskList->GetTask( 0u );
+
+ if(!defaultRenderTask.GetTargetFrameBuffer())
+ {
+ defaultRenderTask.SetViewport( Viewport(0, 0, width, height) );
+ }
+ }
+
+ if( mRenderToFbo )
+ {
+ Dali::FrameBuffer frameBuffer = Dali::FrameBuffer::New( width, height, Dali::FrameBuffer::Attachment::NONE );
+ Dali::Texture texture = Dali::Texture::New( Dali::TextureType::TEXTURE_2D, Dali::Pixel::RGB888, width, height );
+ frameBuffer.AttachColorTexture( texture );
+
+ Dali::RenderTask defaultRenderTask = mRenderTaskList->GetTask( 0u );
+ defaultRenderTask.SetFrameBuffer( frameBuffer );
+ }
+ }