Changes after removal of Core::SurfaceResized() 81/210581/1
authorAdeel Kazmi <adeel.kazmi@samsung.com>
Mon, 22 Jul 2019 12:54:55 +0000 (13:54 +0100)
committerAdeel Kazmi <adeel.kazmi@samsung.com>
Mon, 22 Jul 2019 12:54:55 +0000 (13:54 +0100)
Change-Id: I5b311ee23f631c2dd7078b1d6db98a19e200e9b8

automated-tests/src/dali-adaptor/dali-test-suite-utils/test-application.cpp
dali/integration-api/scene-holder-impl.cpp
dali/integration-api/scene-holder-impl.h
dali/internal/adaptor/common/adaptor-impl.cpp
dali/internal/window-system/common/window-impl.cpp

index 6e41c42..7ffb5e5 100644 (file)
@@ -81,8 +81,6 @@ void TestApplication::CreateScene()
   mScene = Dali::Integration::Scene::New( Vector2( static_cast<float>( mSurfaceWidth ), static_cast<float>( mSurfaceHeight ) ) );
   mScene.SetSurface( *mRenderSurface );
   mScene.SetDpi( Vector2( static_cast<float>( mDpi.x ), static_cast<float>( mDpi.y ) ) );
-
-  mCore->SurfaceResized( mRenderSurface );
 }
 
 void TestApplication::InitializeCore()
index 491c5b4..f785a1b 100644 (file)
@@ -201,6 +201,11 @@ void SceneHolder::SetSurface(Dali::RenderSurfaceInterface* surface)
   OnSurfaceSet( surface );
 }
 
+void SceneHolder::SurfaceResized()
+{
+  mScene.SurfaceResized();
+}
+
 Dali::RenderSurfaceInterface* SceneHolder::GetSurface() const
 {
   return mSurface.get();
index 25a5b91..6b4e488 100644 (file)
@@ -116,6 +116,11 @@ public:
   void SetSurface( Dali::RenderSurfaceInterface* surface );
 
   /**
+   * @brief Called when the surface set is resized.
+   */
+  void SurfaceResized();
+
+  /**
    * @brief Get the render surface
    * @return The render surface
    */
index 3588f3c..6256e04 100755 (executable)
@@ -350,9 +350,6 @@ void Adaptor::Start()
   FontClient fontClient = FontClient::Get();
   fontClient.SetDpi( dpiHor, dpiVer );
 
-  // Tell the core the size of the surface just before we start the render-thread
-  mCore->SurfaceResized( defaultWindow->GetSurface() );
-
   // Initialize the thread controller
   mThreadController->Initialize();
 
@@ -507,9 +504,6 @@ void Adaptor::ReplaceSurface( Dali::Integration::SceneHolder window, Dali::Rende
   {
     if( windowPtr == windowImpl ) // the window is not deleted
     {
-      // Let the core know the surface size has changed
-      mCore->SurfaceResized( &newSurface );
-
       mResizedSignal.Emit( mAdaptor );
 
       windowImpl->SetSurface( &newSurface );
@@ -921,9 +915,6 @@ void Adaptor::OnDamaged( const DamageArea& area )
 
 void Adaptor::SurfaceResizePrepare( Dali::RenderSurfaceInterface* surface, SurfaceSize surfaceSize )
 {
-  // Let the core know the surface size has changed
-  mCore->SurfaceResized( surface );
-
   mResizedSignal.Emit( mAdaptor );
 }
 
index 981ede0..95f342b 100644 (file)
@@ -451,6 +451,8 @@ void Window::SetSize( Dali::Window::WindowSize size )
   {
     Uint16Pair newSize( newRect.width, newRect.height );
 
+    SurfaceResized();
+
     mAdaptor->SurfaceResizePrepare( mSurface.get(), newSize );
 
     mResizedSignal.Emit( newSize );