From f199a6dcd63833d3860912c9f189fe4b622246b0 Mon Sep 17 00:00:00 2001 From: Adeel Kazmi Date: Mon, 22 Jul 2019 13:54:55 +0100 Subject: [PATCH] Changes after removal of Core::SurfaceResized() Change-Id: I5b311ee23f631c2dd7078b1d6db98a19e200e9b8 --- .../src/dali-adaptor/dali-test-suite-utils/test-application.cpp | 2 -- dali/integration-api/scene-holder-impl.cpp | 5 +++++ dali/integration-api/scene-holder-impl.h | 5 +++++ dali/internal/adaptor/common/adaptor-impl.cpp | 9 --------- dali/internal/window-system/common/window-impl.cpp | 2 ++ 5 files changed, 12 insertions(+), 11 deletions(-) diff --git a/automated-tests/src/dali-adaptor/dali-test-suite-utils/test-application.cpp b/automated-tests/src/dali-adaptor/dali-test-suite-utils/test-application.cpp index 6e41c42..7ffb5e5 100644 --- a/automated-tests/src/dali-adaptor/dali-test-suite-utils/test-application.cpp +++ b/automated-tests/src/dali-adaptor/dali-test-suite-utils/test-application.cpp @@ -81,8 +81,6 @@ void TestApplication::CreateScene() mScene = Dali::Integration::Scene::New( Vector2( static_cast( mSurfaceWidth ), static_cast( mSurfaceHeight ) ) ); mScene.SetSurface( *mRenderSurface ); mScene.SetDpi( Vector2( static_cast( mDpi.x ), static_cast( mDpi.y ) ) ); - - mCore->SurfaceResized( mRenderSurface ); } void TestApplication::InitializeCore() diff --git a/dali/integration-api/scene-holder-impl.cpp b/dali/integration-api/scene-holder-impl.cpp index 491c5b4..f785a1b 100644 --- a/dali/integration-api/scene-holder-impl.cpp +++ b/dali/integration-api/scene-holder-impl.cpp @@ -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(); diff --git a/dali/integration-api/scene-holder-impl.h b/dali/integration-api/scene-holder-impl.h index 25a5b91..6b4e488 100644 --- a/dali/integration-api/scene-holder-impl.h +++ b/dali/integration-api/scene-holder-impl.h @@ -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 */ diff --git a/dali/internal/adaptor/common/adaptor-impl.cpp b/dali/internal/adaptor/common/adaptor-impl.cpp index 3588f3c..6256e04 100755 --- a/dali/internal/adaptor/common/adaptor-impl.cpp +++ b/dali/internal/adaptor/common/adaptor-impl.cpp @@ -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 ); } diff --git a/dali/internal/window-system/common/window-impl.cpp b/dali/internal/window-system/common/window-impl.cpp index 981ede0..95f342b 100644 --- a/dali/internal/window-system/common/window-impl.cpp +++ b/dali/internal/window-system/common/window-impl.cpp @@ -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 ); -- 2.7.4