X-Git-Url: http://review.tizen.org/git/?a=blobdiff_plain;f=dali%2Fintegration-api%2Fadaptor-framework%2Fscene-holder-impl.cpp;h=2440b355d0f1bbbff334aaf600e05da9403dcd24;hb=aecc2d4c642e0cdf360e56accd3e5b96622a707f;hp=1a213a2668ec32d77709eb9676168890d955fefa;hpb=398db97500b00d1a7efdbbbc69eb60956b88b038;p=platform%2Fcore%2Fuifw%2Fdali-adaptor.git diff --git a/dali/integration-api/adaptor-framework/scene-holder-impl.cpp b/dali/integration-api/adaptor-framework/scene-holder-impl.cpp index 1a213a2..2440b35 100644 --- a/dali/integration-api/adaptor-framework/scene-holder-impl.cpp +++ b/dali/integration-api/adaptor-framework/scene-holder-impl.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2019 Samsung Electronics Co., Ltd. + * Copyright (c) 2020 Samsung Electronics Co., Ltd. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -120,6 +120,7 @@ SceneHolder::SceneHolder() mId( mSceneHolderCounter++ ), mSurface( nullptr ), mAdaptor( nullptr ), + mIsBeingDeleted( false ), mAdaptorStarted( false ), mVisible( true ) { @@ -132,8 +133,6 @@ SceneHolder::~SceneHolder() mAdaptor->RemoveObserver( *mLifeCycleObserver.get() ); mAdaptor->RemoveWindow( this ); - mAdaptor->DeleteSurface( *mSurface.get() ); - mAdaptor = nullptr; } @@ -188,7 +187,9 @@ void SceneHolder::SetSurface(Dali::RenderSurfaceInterface* surface) { mSurface.reset( surface ); - mScene.SetSurface( *mSurface.get() ); + mScene.SurfaceReplaced(); + + SurfaceResized(); unsigned int dpiHorizontal, dpiVertical; dpiHorizontal = dpiVertical = 0; @@ -203,7 +204,8 @@ void SceneHolder::SetSurface(Dali::RenderSurfaceInterface* surface) void SceneHolder::SurfaceResized() { - mScene.SurfaceResized(); + PositionSize surfacePositionSize = mSurface->GetPositionSize(); + mScene.SurfaceResized( static_cast( surfacePositionSize.width ), static_cast( surfacePositionSize.height ) ); } Dali::RenderSurfaceInterface* SceneHolder::GetSurface() const @@ -235,7 +237,8 @@ void SceneHolder::SetAdaptor(Dali::Adaptor& adaptor) mAdaptorStarted = true; // Create the scene - mScene = Dali::Integration::Scene::New( *mSurface ); + PositionSize surfacePositionSize = mSurface->GetPositionSize(); + mScene = Dali::Integration::Scene::New( Size(static_cast( surfacePositionSize.width ), static_cast( surfacePositionSize.height )) ); Internal::Adaptor::Adaptor& adaptorImpl = Internal::Adaptor::Adaptor::GetImplementation( adaptor ); mAdaptor = &adaptorImpl;