void TestApplication::CreateScene()
{
mRenderSurface = new TestRenderSurface( Dali::PositionSize( 0, 0, mSurfaceWidth, mSurfaceHeight ) );
- mScene = Dali::Integration::Scene::New( Vector2( static_cast<float>( mSurfaceWidth ), static_cast<float>( mSurfaceHeight ) ) );
- mScene.SetSurface( *mRenderSurface );
+ mScene = Dali::Integration::Scene::New( *mRenderSurface );
mScene.SetDpi( Vector2( static_cast<float>( mDpi.x ), static_cast<float>( mDpi.y ) ) );
}
public:
Window( const PositionSize& positionSize )
- : mScene( Dali::Integration::Scene::New( Size( positionSize.width, positionSize.height ) ) ),
- mRenderSurface( new TestRenderSurface( positionSize ) )
+ : mRenderSurface( positionSize ),
+ mScene( Dali::Integration::Scene::New( mRenderSurface ) )
{
- mScene.SetSurface( *mRenderSurface );
}
- virtual ~Window()
- {
- delete mRenderSurface;
- mRenderSurface = nullptr;
- }
+ virtual ~Window() = default;
static Window* New(const PositionSize& positionSize, const std::string& name, const std::string& className, bool isTransparent)
{
return new Window( positionSize );
}
+ TestRenderSurface mRenderSurface;
Integration::Scene mScene;
- TestRenderSurface* mRenderSurface;
};
} // Adaptor
Integration::RenderSurface& Window::GetRenderSurface()
{
- return *GetImplementation( *this ).mRenderSurface;
+ return GetImplementation( *this ).mRenderSurface;
}
namespace DevelWindow