[Tizen](Partial Update) Fix window rotation issue
[platform/core/uifw/dali-core.git] / dali / internal / update / common / scene-graph-scene.cpp
index 224bddb..36b4049 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2021 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2022 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.
@@ -33,7 +33,8 @@ Scene::Scene()
   mSkipRendering(false),
   mSurfaceRect(),
   mSurfaceOrientation(0),
-  mSurfaceRectChanged(false)
+  mSurfaceRectChanged(false),
+  mRotationCompletedAcknowledgement(false)
 {
 }
 
@@ -144,6 +145,11 @@ void Scene::SetSurfaceRect(const Rect<int32_t>& rect)
 {
   mSurfaceRect        = rect;
   mSurfaceRectChanged = true;
+
+  if(mRoot)
+  {
+    mRoot->SetUpdated(true);
+  }
 }
 
 const Rect<int32_t>& Scene::GetSurfaceRect() const
@@ -154,6 +160,11 @@ const Rect<int32_t>& Scene::GetSurfaceRect() const
 void Scene::SetSurfaceOrientation(int32_t orientation)
 {
   mSurfaceOrientation = orientation;
+
+  if(mRoot)
+  {
+    mRoot->SetUpdated(true);
+  }
 }
 
 int32_t Scene::GetSurfaceOrientation() const
@@ -169,6 +180,23 @@ bool Scene::IsSurfaceRectChanged()
   return surfaceRectChanged;
 }
 
+void Scene::SetRotationCompletedAcknowledgement()
+{
+  mRotationCompletedAcknowledgement = true;
+}
+
+bool Scene::IsRotationCompletedAcknowledgementSet()
+{
+  bool setRotationCompletedAcknowledgement = mRotationCompletedAcknowledgement;
+  mRotationCompletedAcknowledgement        = false;
+  return setRotationCompletedAcknowledgement;
+}
+
+std::vector<DirtyRect>& Scene::GetItemsDirtyRects()
+{
+  return mItemsDirtyRects;
+}
+
 } // namespace SceneGraph
 
 } // namespace Internal