Revert "[Tizen] Fix partial update issue"
authorBowon Ryu <bowon.ryu@samsung.com>
Tue, 30 Mar 2021 04:04:50 +0000 (13:04 +0900)
committerBowon Ryu <bowon.ryu@samsung.com>
Tue, 30 Mar 2021 04:04:50 +0000 (13:04 +0900)
This reverts commit eab425b07773dc4fb4c749c08abf34c11162cf6e.

automated-tests/src/dali/utc-Dali-Actor.cpp
dali/internal/render/data-providers/node-data-provider.h
dali/internal/update/common/property-owner.cpp
dali/internal/update/manager/render-task-processor.cpp

index e772118..8af095a 100644 (file)
@@ -8346,172 +8346,6 @@ int utcDaliActorPartialUpdateAnimation(void)
   END_TEST;
 }
 
-int utcDaliActorPartialUpdateChangeVisibility(void)
-{
-  TestApplication application(
-    TestApplication::DEFAULT_SURFACE_WIDTH,
-    TestApplication::DEFAULT_SURFACE_HEIGHT,
-    TestApplication::DEFAULT_HORIZONTAL_DPI,
-    TestApplication::DEFAULT_VERTICAL_DPI,
-    true,
-    true);
-
-  tet_infoline("Check the damaged rect with partial update and visibility change");
-
-  const TestGlAbstraction::ScissorParams& glScissorParams(application.GetGlAbstraction().GetScissorParams());
-
-  Actor actor = CreateRenderableActor();
-  actor.SetProperty(Actor::Property::ANCHOR_POINT, AnchorPoint::TOP_LEFT);
-  actor.SetProperty(Actor::Property::POSITION, Vector3(16.0f, 16.0f, 0.0f));
-  actor.SetProperty(Actor::Property::SIZE, Vector3(16.0f, 16.0f, 0.0f));
-  actor.SetResizePolicy(ResizePolicy::FIXED, Dimension::ALL_DIMENSIONS);
-  application.GetScene().Add(actor);
-
-  application.SendNotification();
-
-  std::vector<Rect<int>> damagedRects;
-  Rect<int>              clippingRect;
-
-  // 1. Actor added, damaged rect is added size of actor
-  application.PreRenderWithPartialUpdate(TestApplication::RENDER_FRAME_INTERVAL, nullptr, damagedRects);
-  DALI_TEST_EQUALS(damagedRects.size(), 1, TEST_LOCATION);
-
-  // Aligned by 16
-  clippingRect = Rect<int>(16, 768, 32, 32); // in screen coordinates, includes 3 last frames updates
-  DALI_TEST_EQUALS<Rect<int>>(clippingRect, damagedRects[0], TEST_LOCATION);
-  application.RenderWithPartialUpdate(damagedRects, clippingRect);
-  DALI_TEST_EQUALS(clippingRect.x, glScissorParams.x, TEST_LOCATION);
-  DALI_TEST_EQUALS(clippingRect.y, glScissorParams.y, TEST_LOCATION);
-  DALI_TEST_EQUALS(clippingRect.width, glScissorParams.width, TEST_LOCATION);
-  DALI_TEST_EQUALS(clippingRect.height, glScissorParams.height, TEST_LOCATION);
-
-  damagedRects.clear();
-  application.PreRenderWithPartialUpdate(TestApplication::RENDER_FRAME_INTERVAL, nullptr, damagedRects);
-  application.RenderWithPartialUpdate(damagedRects, clippingRect);
-
-  damagedRects.clear();
-  application.PreRenderWithPartialUpdate(TestApplication::RENDER_FRAME_INTERVAL, nullptr, damagedRects);
-  application.RenderWithPartialUpdate(damagedRects, clippingRect);
-
-  // Ensure the damaged rect is empty
-  DALI_TEST_EQUALS(damagedRects.size(), 0, TEST_LOCATION);
-
-  // 2. Make the Actor invisible
-  actor.SetProperty(Actor::Property::VISIBLE, false);
-  application.SendNotification();
-
-  damagedRects.clear();
-  application.PreRenderWithPartialUpdate(TestApplication::RENDER_FRAME_INTERVAL, nullptr, damagedRects);
-  DALI_TEST_CHECK(damagedRects.size() > 0);
-  DALI_TEST_EQUALS<Rect<int>>(clippingRect, damagedRects[0], TEST_LOCATION);
-
-  application.RenderWithPartialUpdate(damagedRects, clippingRect);
-  DALI_TEST_EQUALS(clippingRect.x, glScissorParams.x, TEST_LOCATION);
-  DALI_TEST_EQUALS(clippingRect.y, glScissorParams.y, TEST_LOCATION);
-  DALI_TEST_EQUALS(clippingRect.width, glScissorParams.width, TEST_LOCATION);
-  DALI_TEST_EQUALS(clippingRect.height, glScissorParams.height, TEST_LOCATION);
-
-  // 3. Make the Actor visible again
-  actor.SetProperty(Actor::Property::VISIBLE, true);
-  application.SendNotification();
-
-  damagedRects.clear();
-  application.PreRenderWithPartialUpdate(TestApplication::RENDER_FRAME_INTERVAL, nullptr, damagedRects);
-  DALI_TEST_CHECK(damagedRects.size() > 0);
-  DALI_TEST_EQUALS<Rect<int>>(clippingRect, damagedRects[0], TEST_LOCATION);
-
-  application.RenderWithPartialUpdate(damagedRects, clippingRect);
-  DALI_TEST_EQUALS(clippingRect.x, glScissorParams.x, TEST_LOCATION);
-  DALI_TEST_EQUALS(clippingRect.y, glScissorParams.y, TEST_LOCATION);
-  DALI_TEST_EQUALS(clippingRect.width, glScissorParams.width, TEST_LOCATION);
-  DALI_TEST_EQUALS(clippingRect.height, glScissorParams.height, TEST_LOCATION);
-
-  END_TEST;
-}
-
-int utcDaliActorPartialUpdateOnOffScene(void)
-{
-  TestApplication application(
-    TestApplication::DEFAULT_SURFACE_WIDTH,
-    TestApplication::DEFAULT_SURFACE_HEIGHT,
-    TestApplication::DEFAULT_HORIZONTAL_DPI,
-    TestApplication::DEFAULT_VERTICAL_DPI,
-    true,
-    true);
-
-  tet_infoline("Check the damaged rect with partial update and on/off scene");
-
-  const TestGlAbstraction::ScissorParams& glScissorParams(application.GetGlAbstraction().GetScissorParams());
-
-  Actor actor = CreateRenderableActor();
-  actor.SetProperty(Actor::Property::ANCHOR_POINT, AnchorPoint::TOP_LEFT);
-  actor.SetProperty(Actor::Property::POSITION, Vector3(16.0f, 16.0f, 0.0f));
-  actor.SetProperty(Actor::Property::SIZE, Vector3(16.0f, 16.0f, 0.0f));
-  actor.SetResizePolicy(ResizePolicy::FIXED, Dimension::ALL_DIMENSIONS);
-  application.GetScene().Add(actor);
-
-  application.SendNotification();
-
-  std::vector<Rect<int>> damagedRects;
-  Rect<int>              clippingRect;
-
-  // 1. Actor added, damaged rect is added size of actor
-  application.PreRenderWithPartialUpdate(TestApplication::RENDER_FRAME_INTERVAL, nullptr, damagedRects);
-  DALI_TEST_EQUALS(damagedRects.size(), 1, TEST_LOCATION);
-
-  // Aligned by 16
-  clippingRect = Rect<int>(16, 768, 32, 32); // in screen coordinates, includes 3 last frames updates
-  DALI_TEST_EQUALS<Rect<int>>(clippingRect, damagedRects[0], TEST_LOCATION);
-  application.RenderWithPartialUpdate(damagedRects, clippingRect);
-  DALI_TEST_EQUALS(clippingRect.x, glScissorParams.x, TEST_LOCATION);
-  DALI_TEST_EQUALS(clippingRect.y, glScissorParams.y, TEST_LOCATION);
-  DALI_TEST_EQUALS(clippingRect.width, glScissorParams.width, TEST_LOCATION);
-  DALI_TEST_EQUALS(clippingRect.height, glScissorParams.height, TEST_LOCATION);
-
-  damagedRects.clear();
-  application.PreRenderWithPartialUpdate(TestApplication::RENDER_FRAME_INTERVAL, nullptr, damagedRects);
-  application.RenderWithPartialUpdate(damagedRects, clippingRect);
-
-  damagedRects.clear();
-  application.PreRenderWithPartialUpdate(TestApplication::RENDER_FRAME_INTERVAL, nullptr, damagedRects);
-  application.RenderWithPartialUpdate(damagedRects, clippingRect);
-
-  // Ensure the damaged rect is empty
-  DALI_TEST_EQUALS(damagedRects.size(), 0, TEST_LOCATION);
-
-  // 2. Remove the Actor from the Scene
-  actor.Unparent();
-  application.SendNotification();
-
-  damagedRects.clear();
-  application.PreRenderWithPartialUpdate(TestApplication::RENDER_FRAME_INTERVAL, nullptr, damagedRects);
-  DALI_TEST_CHECK(damagedRects.size() > 0);
-  DALI_TEST_EQUALS<Rect<int>>(clippingRect, damagedRects[0], TEST_LOCATION);
-
-  application.RenderWithPartialUpdate(damagedRects, clippingRect);
-  DALI_TEST_EQUALS(clippingRect.x, glScissorParams.x, TEST_LOCATION);
-  DALI_TEST_EQUALS(clippingRect.y, glScissorParams.y, TEST_LOCATION);
-  DALI_TEST_EQUALS(clippingRect.width, glScissorParams.width, TEST_LOCATION);
-  DALI_TEST_EQUALS(clippingRect.height, glScissorParams.height, TEST_LOCATION);
-
-  // 3. Add the Actor to the Scene again
-  application.GetScene().Add(actor);
-  application.SendNotification();
-
-  damagedRects.clear();
-  application.PreRenderWithPartialUpdate(TestApplication::RENDER_FRAME_INTERVAL, nullptr, damagedRects);
-  DALI_TEST_CHECK(damagedRects.size() > 0);
-  DALI_TEST_EQUALS<Rect<int>>(clippingRect, damagedRects[0], TEST_LOCATION);
-
-  application.RenderWithPartialUpdate(damagedRects, clippingRect);
-  DALI_TEST_EQUALS(clippingRect.x, glScissorParams.x, TEST_LOCATION);
-  DALI_TEST_EQUALS(clippingRect.y, glScissorParams.y, TEST_LOCATION);
-  DALI_TEST_EQUALS(clippingRect.width, glScissorParams.width, TEST_LOCATION);
-  DALI_TEST_EQUALS(clippingRect.height, glScissorParams.height, TEST_LOCATION);
-
-  END_TEST;
-}
-
 int UtcDaliActorCaptureAllTouchAfterStartPropertyP(void)
 {
   TestApplication application;
index f2f8c0a..3889fef 100644 (file)
@@ -85,7 +85,6 @@ struct PartialRenderingNodeData
 
   PartialRenderingCacheInfo mData[2u];         /// Double-buffered data
   uint8_t                   mCurrentIndex{0u}; /// Current buffer index
-  bool                      mVisible{true};    /// Visible state
 };
 
 /**
index 51a7dc6..69ee2a4 100644 (file)
@@ -88,7 +88,6 @@ void PropertyOwner::Destroy()
 void PropertyOwner::ConnectToSceneGraph()
 {
   mIsConnectedToSceneGraph = true;
-  SetUpdated(true);
 
   // Notification for observers
   const ConstObserverIter endIter = mObservers.End();
index db76d86..72822ee 100644 (file)
@@ -110,17 +110,9 @@ bool AddRenderablesForTask(BufferIndex updateBufferIndex,
   // Short-circuit for invisible nodes
   if(!node.IsVisible(updateBufferIndex))
   {
-    node.GetPartialRenderingData().mVisible = false;
     return keepRendering;
   }
 
-  // If the node was not previously visible
-  if(!node.GetPartialRenderingData().mVisible)
-  {
-    node.GetPartialRenderingData().mVisible = true;
-    node.SetUpdated(true);
-  }
-
   // Check whether node is exclusive to a different render-task
   const RenderTask* exclusiveTo = node.GetExclusiveRenderTask();
   if(exclusiveTo && (exclusiveTo != &renderTask))