From: Bowon Ryu Date: Tue, 30 Mar 2021 04:04:50 +0000 (+0900) Subject: Revert "[Tizen] Fix partial update issue" X-Git-Tag: accepted/tizen/unified/20210331.054138~7 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=8b469dac18a6cbe0de5171a8afa3c16b9a0f6bd8;p=platform%2Fcore%2Fuifw%2Fdali-core.git Revert "[Tizen] Fix partial update issue" This reverts commit eab425b07773dc4fb4c749c08abf34c11162cf6e. --- diff --git a/automated-tests/src/dali/utc-Dali-Actor.cpp b/automated-tests/src/dali/utc-Dali-Actor.cpp index e772118..8af095a 100644 --- a/automated-tests/src/dali/utc-Dali-Actor.cpp +++ b/automated-tests/src/dali/utc-Dali-Actor.cpp @@ -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> damagedRects; - Rect 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(16, 768, 32, 32); // in screen coordinates, includes 3 last frames updates - DALI_TEST_EQUALS>(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>(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>(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> damagedRects; - Rect 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(16, 768, 32, 32); // in screen coordinates, includes 3 last frames updates - DALI_TEST_EQUALS>(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>(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>(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; diff --git a/dali/internal/render/data-providers/node-data-provider.h b/dali/internal/render/data-providers/node-data-provider.h index f2f8c0a..3889fef 100644 --- a/dali/internal/render/data-providers/node-data-provider.h +++ b/dali/internal/render/data-providers/node-data-provider.h @@ -85,7 +85,6 @@ struct PartialRenderingNodeData PartialRenderingCacheInfo mData[2u]; /// Double-buffered data uint8_t mCurrentIndex{0u}; /// Current buffer index - bool mVisible{true}; /// Visible state }; /** diff --git a/dali/internal/update/common/property-owner.cpp b/dali/internal/update/common/property-owner.cpp index 51a7dc6..69ee2a4 100644 --- a/dali/internal/update/common/property-owner.cpp +++ b/dali/internal/update/common/property-owner.cpp @@ -88,7 +88,6 @@ void PropertyOwner::Destroy() void PropertyOwner::ConnectToSceneGraph() { mIsConnectedToSceneGraph = true; - SetUpdated(true); // Notification for observers const ConstObserverIter endIter = mObservers.End(); diff --git a/dali/internal/update/manager/render-task-processor.cpp b/dali/internal/update/manager/render-task-processor.cpp index db76d86..72822ee 100644 --- a/dali/internal/update/manager/render-task-processor.cpp +++ b/dali/internal/update/manager/render-task-processor.cpp @@ -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))