projects
/
platform
/
core
/
uifw
/
dali-adaptor.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Revert "Remove EGL surface in the update thread"
[platform/core/uifw/dali-adaptor.git]
/
dali
/
integration-api
/
adaptor-framework
/
scene-holder-impl.cpp
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
(file)
--- 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) 20
19
Samsung Electronics Co., Ltd.
+ * Copyright (c) 20
20
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.
*
* 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 ),
mId( mSceneHolderCounter++ ),
mSurface( nullptr ),
mAdaptor( nullptr ),
+ mIsBeingDeleted( false ),
mAdaptorStarted( false ),
mVisible( true )
{
mAdaptorStarted( false ),
mVisible( true )
{
@@
-132,8
+133,6
@@
SceneHolder::~SceneHolder()
mAdaptor->RemoveObserver( *mLifeCycleObserver.get() );
mAdaptor->RemoveWindow( this );
mAdaptor->RemoveObserver( *mLifeCycleObserver.get() );
mAdaptor->RemoveWindow( this );
- mAdaptor->DeleteSurface( *mSurface.get() );
-
mAdaptor = nullptr;
}
mAdaptor = nullptr;
}
@@
-188,7
+187,9
@@
void SceneHolder::SetSurface(Dali::RenderSurfaceInterface* surface)
{
mSurface.reset( surface );
{
mSurface.reset( surface );
- mScene.SetSurface( *mSurface.get() );
+ mScene.SurfaceReplaced();
+
+ SurfaceResized();
unsigned int dpiHorizontal, dpiVertical;
dpiHorizontal = dpiVertical = 0;
unsigned int dpiHorizontal, dpiVertical;
dpiHorizontal = dpiVertical = 0;
@@
-203,7
+204,8
@@
void SceneHolder::SetSurface(Dali::RenderSurfaceInterface* surface)
void SceneHolder::SurfaceResized()
{
void SceneHolder::SurfaceResized()
{
- mScene.SurfaceResized();
+ PositionSize surfacePositionSize = mSurface->GetPositionSize();
+ mScene.SurfaceResized( static_cast<float>( surfacePositionSize.width ), static_cast<float>( surfacePositionSize.height ) );
}
Dali::RenderSurfaceInterface* SceneHolder::GetSurface() const
}
Dali::RenderSurfaceInterface* SceneHolder::GetSurface() const
@@
-235,7
+237,8
@@
void SceneHolder::SetAdaptor(Dali::Adaptor& adaptor)
mAdaptorStarted = true;
// Create the scene
mAdaptorStarted = true;
// Create the scene
- mScene = Dali::Integration::Scene::New( *mSurface );
+ PositionSize surfacePositionSize = mSurface->GetPositionSize();
+ mScene = Dali::Integration::Scene::New( Size(static_cast<float>( surfacePositionSize.width ), static_cast<float>( surfacePositionSize.height )) );
Internal::Adaptor::Adaptor& adaptorImpl = Internal::Adaptor::Adaptor::GetImplementation( adaptor );
mAdaptor = &adaptorImpl;
Internal::Adaptor::Adaptor& adaptorImpl = Internal::Adaptor::Adaptor::GetImplementation( adaptor );
mAdaptor = &adaptorImpl;