projects
/
platform
/
core
/
uifw
/
dali-core.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
bc0b5ec
)
[Tizen] Add New API of Scene with screen orientation
accepted/tizen/unified/20200917.030635
submit/tizen/20200916.173718
author
Seoyeon Kim
<seoyeon2.kim@samsung.com>
Wed, 16 Sep 2020 03:06:52 +0000
(12:06 +0900)
committer
Seoyeon Kim
<seoyeon2.kim@samsung.com>
Wed, 16 Sep 2020 03:10:14 +0000
(12:10 +0900)
This reverts commit
3009003fa7c0cc84454fc9d255ff958c0f308df8
.
dali/integration-api/scene.cpp
patch
|
blob
|
history
dali/integration-api/scene.h
patch
|
blob
|
history
dali/internal/event/common/scene-impl.cpp
patch
|
blob
|
history
dali/internal/event/common/scene-impl.h
patch
|
blob
|
history
diff --git
a/dali/integration-api/scene.cpp
b/dali/integration-api/scene.cpp
index
192ad2e
..
2675ba5
100644
(file)
--- a/
dali/integration-api/scene.cpp
+++ b/
dali/integration-api/scene.cpp
@@
-33,6
+33,12
@@
Scene Scene::New(Size size)
return Scene(internal.Get());
}
return Scene(internal.Get());
}
+Scene Scene::New(Size size, int orientation)
+{
+ Internal::ScenePtr internal = Internal::Scene::New(size, orientation);
+ return Scene(internal.Get());
+}
+
Scene Scene::DownCast(BaseHandle handle)
{
return Scene(dynamic_cast<Dali::Internal::Scene*>(handle.GetObjectPtr()));
Scene Scene::DownCast(BaseHandle handle)
{
return Scene(dynamic_cast<Dali::Internal::Scene*>(handle.GetObjectPtr()));
diff --git
a/dali/integration-api/scene.h
b/dali/integration-api/scene.h
index
c663e67
..
1f6a60a
100644
(file)
--- a/
dali/integration-api/scene.h
+++ b/
dali/integration-api/scene.h
@@
-72,6
+72,16
@@
public:
static Scene New(Size size);
/**
static Scene New(Size size);
/**
+ * @brief Create an initialized Scene handle.
+ *
+ * @param[in] size The size of the set surface for this scene
+ * @param[in] orientation The orientation of the set surface for this scene
+ *
+ * @return a handle to a newly allocated Dali resource.
+ */
+ static Scene New( Size size, int orientation );
+
+ /**
* @brief Downcast an Object handle to Scene handle.
*
* If handle points to a Scene object the downcast produces
* @brief Downcast an Object handle to Scene handle.
*
* If handle points to a Scene object the downcast produces
diff --git
a/dali/internal/event/common/scene-impl.cpp
b/dali/internal/event/common/scene-impl.cpp
index
45bda4d
..
208c1f7
100755
(executable)
--- a/
dali/internal/event/common/scene-impl.cpp
+++ b/
dali/internal/event/common/scene-impl.cpp
@@
-48,7
+48,17
@@
ScenePtr Scene::New( Size size )
ScenePtr scene = new Scene;
// Second-phase construction
ScenePtr scene = new Scene;
// Second-phase construction
- scene->Initialize( size );
+ scene->Initialize( size, 0 );
+
+ return scene;
+}
+
+ScenePtr Scene::New( Size size, int orientation )
+{
+ ScenePtr scene = new Scene;
+
+ // Second-phase construction
+ scene->Initialize( size, orientation );
return scene;
}
return scene;
}
@@
-95,7
+105,7
@@
Scene::~Scene()
// When this destructor is called, the scene has either already been removed from Core or Core has already been destroyed
}
// When this destructor is called, the scene has either already been removed from Core or Core has already been destroyed
}
-void Scene::Initialize( Size size )
+void Scene::Initialize( Size size
, int orientation
)
{
ThreadLocalStorage* tls = ThreadLocalStorage::GetInternal();
{
ThreadLocalStorage* tls = ThreadLocalStorage::GetInternal();
@@
-131,6
+141,7
@@
void Scene::Initialize( Size size )
// Create the default render-task and ensure clear is enabled on it to show the background color
RenderTaskPtr renderTask = mRenderTaskList->CreateTask( mRootLayer.Get(), mDefaultCamera.Get() );
renderTask->SetClearEnabled(true);
// Create the default render-task and ensure clear is enabled on it to show the background color
RenderTaskPtr renderTask = mRenderTaskList->CreateTask( mRootLayer.Get(), mDefaultCamera.Get() );
renderTask->SetClearEnabled(true);
+ mSurfaceOrientation = orientation;
SurfaceResized( size.width, size.height, mSurfaceOrientation, false );
SurfaceResized( size.width, size.height, mSurfaceOrientation, false );
diff --git
a/dali/internal/event/common/scene-impl.h
b/dali/internal/event/common/scene-impl.h
index
6597ddc
..
c84d4c6
100755
(executable)
--- a/
dali/internal/event/common/scene-impl.h
+++ b/
dali/internal/event/common/scene-impl.h
@@
-117,6
+117,11
@@
public:
static ScenePtr New( Size size );
/**
static ScenePtr New( Size size );
/**
+ * @copydoc Dali::Integration::Scene::New
+ */
+ static ScenePtr New( Size size, int orientation );
+
+ /**
* virtual destructor
*/
~Scene() override;
* virtual destructor
*/
~Scene() override;
@@
-340,8
+345,9
@@
private:
* Second-phase constructor.
*
* @param[in] size The size of the set surface
* Second-phase constructor.
*
* @param[in] size The size of the set surface
+ * @param[in] orientation The orientation of the set surface for this scene
*/
*/
- void Initialize( Size size );
+ void Initialize( Size size
, int orientation
);
// Undefined
Scene(const Scene&) = delete;
// Undefined
Scene(const Scene&) = delete;