X-Git-Url: http://review.tizen.org/git/?a=blobdiff_plain;f=dali%2Finternal%2Fevent%2Fsize-negotiation%2Frelayout-controller-impl.cpp;h=2d639f5fc28dc350fdb3dcab885ca9867549a975;hb=613f1ec636807462adb399d33585b0def8461ad4;hp=5f81a1a7c4aaff379fdc9205ab9df39afa91130c;hpb=ae5e14c94a8d9e3d4905cf47e2feed16a1e15a59;p=platform%2Fcore%2Fuifw%2Fdali-core.git diff --git a/dali/internal/event/size-negotiation/relayout-controller-impl.cpp b/dali/internal/event/size-negotiation/relayout-controller-impl.cpp index 5f81a1a..2d639f5 100644 --- a/dali/internal/event/size-negotiation/relayout-controller-impl.cpp +++ b/dali/internal/event/size-negotiation/relayout-controller-impl.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2020 Samsung Electronics Co., Ltd. + * Copyright (c) 2023 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. @@ -16,7 +16,7 @@ */ // CLASS HEADER -#include "relayout-controller-impl.h" +#include // EXTERNAL INCLUDES #if defined(DEBUG_ENABLED) @@ -26,23 +26,24 @@ // INTERNAL INCLUDES #include #include -#include -#include +#include #include #include #include +#include +#include namespace Dali { - namespace Internal { - namespace { +DALI_INIT_TRACE_FILTER(gTraceFilter, DALI_TRACE_PERFORMANCE_MARKER, false); + #if defined(DEBUG_ENABLED) -Integration::Log::Filter* gLogFilter( Integration::Log::Filter::New(Debug::NoLogging, false, "LOG_RELAYOUT_CONTROLLER") ); +Integration::Log::Filter* gLogFilter(Integration::Log::Filter::New(Debug::NoLogging, false, "LOG_RELAYOUT_CONTROLLER")); /** * Prints out all the children of the given actor when debug is enabled. @@ -50,34 +51,34 @@ Integration::Log::Filter* gLogFilter( Integration::Log::Filter::New(Debug::NoLog * @param[in] actor The actor whose children to print. * @param[in] level The number of " | " to put in front of the children. */ -void PrintChildren( Dali::Actor actor, int level ) +void PrintChildren(Dali::Actor actor, int level) { std::ostringstream output; - for ( int t = 0; t < level; ++t ) + for(int t = 0; t < level; ++t) { output << " | "; } output << actor.GetTypeName(); - output << ", " << actor.GetProperty< std::string >( Dali::Actor::Property::NAME ); + output << ", " << actor.GetProperty(Dali::Actor::Property::NAME); - output << " - Pos: " << actor.GetCurrentProperty< Vector3 >( Dali::Actor::Property::POSITION ) << " Size: " << actor.GetTargetSize(); + output << " - Pos: " << actor.GetCurrentProperty(Dali::Actor::Property::POSITION) << " Size: " << actor.GetTargetSize(); - output << ", Dirty: (" << ( GetImplementation( actor ).IsLayoutDirty( Dimension::WIDTH ) ? "TRUE" : "FALSE" ) << "," << ( GetImplementation( actor ).IsLayoutDirty( Dimension::HEIGHT ) ? "TRUE" : "FALSE" ) << ")"; - output << ", Negotiated: (" << ( GetImplementation( actor ).IsLayoutNegotiated( Dimension::WIDTH ) ? "TRUE" : "FALSE" ) << "," << ( GetImplementation( actor ).IsLayoutNegotiated( Dimension::HEIGHT ) ? "TRUE" : "FALSE" ) << ")"; - output << ", Enabled: " << ( GetImplementation( actor ).IsRelayoutEnabled() ? "TRUE" : "FALSE" ); + output << ", Dirty: (" << (GetImplementation(actor).IsLayoutDirty(Dimension::WIDTH) ? "TRUE" : "FALSE") << "," << (GetImplementation(actor).IsLayoutDirty(Dimension::HEIGHT) ? "TRUE" : "FALSE") << ")"; + output << ", Negotiated: (" << (GetImplementation(actor).IsLayoutNegotiated(Dimension::WIDTH) ? "TRUE" : "FALSE") << "," << (GetImplementation(actor).IsLayoutNegotiated(Dimension::HEIGHT) ? "TRUE" : "FALSE") << ")"; + output << ", Enabled: " << (GetImplementation(actor).IsRelayoutEnabled() ? "TRUE" : "FALSE"); output << ", (" << actor.GetObjectPtr() << ")" << std::endl; - DALI_LOG_INFO( gLogFilter, Debug::Verbose, output.str().c_str() ); + DALI_LOG_INFO(gLogFilter, Debug::Verbose, output.str().c_str()); ++level; uint32_t numChildren = actor.GetChildCount(); - for( uint32_t i=0; iIsEnabledFor( Debug::Verbose ) ) + if(gLogFilter->IsEnabledFor(Debug::Verbose)) { - DALI_LOG_INFO( gLogFilter, Debug::Verbose, "---------- ROOT LAYER ----------\n" ); + DALI_LOG_INFO(gLogFilter, Debug::Verbose, "---------- ROOT LAYER ----------\n"); - PrintChildren( Stage::GetCurrent()->GetRootLayer(), 0 ); + PrintChildren(Stage::GetCurrent()->GetRootLayer(), 0); } } @@ -105,98 +106,110 @@ void PrintHierarchy() } // unnamed namespace -RelayoutController::RelayoutController( Integration::RenderController& controller ) -: mRenderController( controller ), +RelayoutController::RelayoutController(Integration::RenderController& controller) +: mRenderController(controller), mRelayoutInfoAllocator(), - mSlotDelegate( this ), - mRelayoutStack( new MemoryPoolRelayoutContainer( mRelayoutInfoAllocator ) ), - mRelayoutConnection( false ), - mRelayoutFlag( false ), - mEnabled( false ), - mPerformingRelayout( false ), - mProcessingCoreEvents( false ) + mSlotDelegate(this), + mRelayoutStack(new MemoryPoolRelayoutContainer(mRelayoutInfoAllocator)), + mRelayoutConnection(false), + mRelayoutFlag(false), + mEnabled(false), + mPerformingRelayout(false), + mProcessingCoreEvents(false) { // Make space for 32 controls to avoid having to copy construct a lot in the beginning - mRelayoutStack->Reserve( 32 ); + mRelayoutStack->Reserve(32); + mPotentialRedundantSubRoots.reserve(32); + mTopOfSubTreeStack.reserve(32); } -RelayoutController::~RelayoutController() -{ - delete mRelayoutStack; -} +RelayoutController::~RelayoutController() = default; RelayoutController* RelayoutController::Get() { - return &ThreadLocalStorage::Get().GetRelayoutController(); + // There was crash when destroying actors and the ResizePolicy is USE_NATURAL_SIZE + // The ThreadLocalStorage::Get() only retrieve STL without checking if it exists. + // The caller of RelayoutController::Get() should check if RelayoutController is not null. + if(ThreadLocalStorage::Created()) + { + return &ThreadLocalStorage::Get().GetRelayoutController(); + } + + return nullptr; } -void RelayoutController::QueueActor( Internal::Actor* actor, RelayoutContainer& actors, Vector2 size ) +void RelayoutController::QueueActor(Internal::Actor* actor, RelayoutContainer& actors, Vector2 size) { - if( actor && actor->RelayoutRequired() ) + if(actor && actor->RelayoutRequired()) { - Dali::Actor actorHandle = Dali::Actor( actor ); - actors.Add( actorHandle, size ); + Dali::Actor actorHandle = Dali::Actor(actor); + actors.Add(actorHandle, size); } } -void RelayoutController::RequestRelayout( Dali::Actor& actor, Dimension::Type dimension ) +void RelayoutController::RequestRelayout(Dali::Actor& actor, Dimension::Type dimension) { - if( !mEnabled ) + if(!mEnabled) { return; } - std::vector< Dali::Actor > potentialRedundantSubRoots; - std::vector< Dali::Actor > topOfSubTreeStack; + std::vector& potentialRedundantSubRoots = mPotentialRedundantSubRoots; + std::vector& topOfSubTreeStack = mTopOfSubTreeStack; - topOfSubTreeStack.push_back( actor ); + DALI_ASSERT_ALWAYS(potentialRedundantSubRoots.empty() && "potentialRedundantSubRoots must be empty before RequestRelayout!"); + DALI_ASSERT_ALWAYS(topOfSubTreeStack.empty() && "topOfSubTreeStack must be empty before RequestRelayout!"); + + topOfSubTreeStack.push_back(actor); // Propagate on all dimensions - for( uint32_t i = 0; i < Dimension::DIMENSION_COUNT; ++i ) + for(uint32_t i = 0; i < Dimension::DIMENSION_COUNT; ++i) { - if( dimension & ( 1 << i ) ) + if(dimension & (1 << i)) { // Do the propagation - PropagateAll( actor, static_cast< Dimension::Type >( 1 << i ), topOfSubTreeStack, potentialRedundantSubRoots ); + PropagateAll(actor, static_cast(1 << i), topOfSubTreeStack, potentialRedundantSubRoots); } } - while( !topOfSubTreeStack.empty() ) + while(!topOfSubTreeStack.empty()) { // Request this actor as head of sub-tree if it is not dependent on a parent that is dirty Dali::Actor subTreeActor = topOfSubTreeStack.back(); topOfSubTreeStack.pop_back(); Dali::Actor parent = subTreeActor.GetParent(); - if( !parent || !( GetImplementation( subTreeActor ).RelayoutDependentOnParent() && GetImplementation( parent ).RelayoutRequired() ) ) + if(!parent || !(GetImplementation(subTreeActor).RelayoutDependentOnParent() && GetImplementation(parent).RelayoutRequired())) { // Add sub tree root to relayout list - AddRequest( subTreeActor ); + AddRequest(subTreeActor); // Flag request for end of frame Request(); } else { - potentialRedundantSubRoots.push_back( subTreeActor ); + potentialRedundantSubRoots.push_back(subTreeActor); } } // Remove any redundant sub-tree heads - for( auto& subRoot : potentialRedundantSubRoots ) + for(auto& subRoot : potentialRedundantSubRoots) { - RemoveRequest( subRoot ); + RemoveRequest(subRoot); } - if ( !mProcessingCoreEvents ) + potentialRedundantSubRoots.clear(); + + if(!mProcessingCoreEvents) { - mRenderController.RequestProcessEventsOnIdle( false ); + mRenderController.RequestProcessEventsOnIdle(false); } } void RelayoutController::OnApplicationSceneCreated() { - DALI_LOG_INFO( gLogFilter, Debug::General, "[Internal::RelayoutController::OnApplicationSceneCreated]\n" ); + DALI_LOG_INFO(gLogFilter, Debug::General, "[Internal::RelayoutController::OnApplicationSceneCreated]\n"); // Open relayout controller to receive relayout requests mEnabled = true; @@ -205,205 +218,199 @@ void RelayoutController::OnApplicationSceneCreated() Request(); } -void RelayoutController::RequestRelayoutTree( Dali::Actor& actor ) +void RelayoutController::RequestRelayoutTree(Dali::Actor& actor) { - if( !mEnabled ) + if(!mEnabled) { return; } // Only set dirty flag if doing relayout and not already marked as dirty - Actor& actorImpl = GetImplementation( actor ); - if( actorImpl.RelayoutPossible() ) + Actor& actorImpl = GetImplementation(actor); + if(actorImpl.RelayoutPossible()) { // If parent is not in relayout we are at the top of a new sub-tree Dali::Actor parent = actor.GetParent(); - if( !parent || !GetImplementation( parent ).IsRelayoutEnabled() ) + if(!parent || !GetImplementation(parent).IsRelayoutEnabled()) { - AddRequest( actor ); + AddRequest(actor); } // Set dirty flag on actors that are enabled - actorImpl.SetLayoutDirty( true ); - actorImpl.SetLayoutNegotiated( false ); // Reset this flag ready for next relayout + actorImpl.SetLayoutDirty(true); + actorImpl.SetLayoutNegotiated(false); // Reset this flag ready for next relayout } // Propagate down to children - for( uint32_t i = 0; i < actor.GetChildCount(); ++i ) + for(uint32_t i = 0; i < actor.GetChildCount(); ++i) { - Dali::Actor child = actor.GetChildAt( i ); + Dali::Actor child = actor.GetChildAt(i); - RequestRelayoutTree( child ); + RequestRelayoutTree(child); } } -void RelayoutController::PropagateAll( Dali::Actor& actor, Dimension::Type dimension, std::vector< Dali::Actor >& topOfSubTreeStack, std::vector< Dali::Actor >& potentialRedundantSubRoots ) +void RelayoutController::PropagateAll(Dali::Actor& actor, Dimension::Type dimension, std::vector& topOfSubTreeStack, std::vector& potentialRedundantSubRoots) { // Only set dirty flag if doing relayout and not already marked as dirty - Actor& actorImpl = GetImplementation( actor ); - if( actorImpl.RelayoutPossible( dimension ) ) + Actor& actorImpl = GetImplementation(actor); + if(actorImpl.RelayoutPossible(dimension)) { // Set dirty and negotiated flags - actorImpl.SetLayoutDirty( true, dimension ); - actorImpl.SetLayoutNegotiated( false, dimension ); // Reset this flag ready for next relayout + actorImpl.SetLayoutDirty(true, dimension); + actorImpl.SetLayoutNegotiated(false, dimension); // Reset this flag ready for next relayout // Check for dimension dependecy: width for height/height for width etc // Check each possible dimension and see if it is dependent on the input one - for( uint32_t i = 0; i < Dimension::DIMENSION_COUNT; ++i ) + for(uint32_t i = 0; i < Dimension::DIMENSION_COUNT; ++i) { - Dimension::Type dimensionToCheck = static_cast< Dimension::Type >( 1 << i ); + Dimension::Type dimensionToCheck = static_cast(1 << i); - if( actorImpl.RelayoutDependentOnDimension( dimension, dimensionToCheck ) && - !actorImpl.IsLayoutDirty( dimensionToCheck ) ) + if(actorImpl.RelayoutDependentOnDimension(dimension, dimensionToCheck) && + !actorImpl.IsLayoutDirty(dimensionToCheck)) { - PropagateAll( actor, dimensionToCheck, topOfSubTreeStack, potentialRedundantSubRoots ); + PropagateAll(actor, dimensionToCheck, topOfSubTreeStack, potentialRedundantSubRoots); } } // Propagate up to parent Dali::Actor parent = actor.GetParent(); - if( parent ) + if(parent) { - Actor& parentImpl = GetImplementation( parent ); - if( parentImpl.RelayoutDependentOnChildren( dimension ) && !parentImpl.IsLayoutDirty( dimension ) ) + Actor& parentImpl = GetImplementation(parent); + if(parentImpl.RelayoutDependentOnChildren(dimension) && !parentImpl.IsLayoutDirty(dimension)) { // Store the highest parent reached bool found = false; - for( auto&& element : topOfSubTreeStack ) + for(auto&& element : topOfSubTreeStack) { - if( element == parent ) + if(element == parent) { found = true; break; } } - if( !found ) + if(!found) { - topOfSubTreeStack.push_back( parent ); + topOfSubTreeStack.push_back(parent); } // Propagate up - PropagateAll( parent, dimension, topOfSubTreeStack, potentialRedundantSubRoots ); + PropagateAll(parent, dimension, topOfSubTreeStack, potentialRedundantSubRoots); } } // Propagate down to children - for( unsigned int i = 0, childCount = actor.GetChildCount(); i < childCount; ++i ) + for(unsigned int i = 0, childCount = actor.GetChildCount(); i < childCount; ++i) { - Dali::Actor child = actor.GetChildAt( i ); - Actor& childImpl = GetImplementation( child ); + Dali::Actor child = actor.GetChildAt(i); + Actor& childImpl = GetImplementation(child); - if( childImpl.IsRelayoutEnabled() && childImpl.RelayoutDependentOnParent( dimension ) ) + if(childImpl.IsRelayoutEnabled() && childImpl.RelayoutDependentOnParent(dimension)) { - if( childImpl.IsLayoutDirty( dimension ) ) + if(childImpl.IsLayoutDirty(dimension)) { // We have found a child that could potentially have already been collected for relayout - potentialRedundantSubRoots.push_back( child ); + potentialRedundantSubRoots.push_back(child); } else { - PropagateAll( child, dimension, topOfSubTreeStack, potentialRedundantSubRoots ); + PropagateAll(child, dimension, topOfSubTreeStack, potentialRedundantSubRoots); } } } } } - -void RelayoutController::PropagateFlags( Dali::Actor& actor, Dimension::Type dimension ) +void RelayoutController::PropagateFlags(Dali::Actor& actor, Dimension::Type dimension) { // Only set dirty flag if doing relayout and not already marked as dirty - Actor& actorImpl = GetImplementation( actor ); - if( actorImpl.IsRelayoutEnabled() ) + Actor& actorImpl = GetImplementation(actor); + if(actorImpl.IsRelayoutEnabled()) { // Set dirty and negotiated flags - actorImpl.SetLayoutDirty( true, dimension ); - actorImpl.SetLayoutNegotiated( false, dimension ); // Reset this flag ready for next relayout + actorImpl.SetLayoutDirty(true, dimension); + actorImpl.SetLayoutNegotiated(false, dimension); // Reset this flag ready for next relayout // Check for dimension dependecy: width for height/height for width etc // Check each possible dimension and see if it is dependent on the input one - for( uint32_t i = 0; i < Dimension::DIMENSION_COUNT; ++i ) + for(uint32_t i = 0; i < Dimension::DIMENSION_COUNT; ++i) { - Dimension::Type dimensionToCheck = static_cast< Dimension::Type >( 1 << i ); + Dimension::Type dimensionToCheck = static_cast(1 << i); - if( actorImpl.RelayoutDependentOnDimension( dimension, dimensionToCheck ) ) + if(actorImpl.RelayoutDependentOnDimension(dimension, dimensionToCheck)) { - PropagateFlags( actor, dimensionToCheck ); + PropagateFlags(actor, dimensionToCheck); } } // Propagate up to parent Dali::Actor parent = actor.GetParent(); - if( parent ) + if(parent) { - Actor& parentImpl = GetImplementation( parent ); - if( parentImpl.RelayoutDependentOnChildren( dimension ) ) + Actor& parentImpl = GetImplementation(parent); + if(parentImpl.RelayoutDependentOnChildren(dimension)) { // Propagate up - PropagateFlags( parent, dimension ); + PropagateFlags(parent, dimension); } } // Propagate down to children - for( uint32_t i = 0, childCount = actor.GetChildCount(); i < childCount; ++i ) + for(uint32_t i = 0, childCount = actor.GetChildCount(); i < childCount; ++i) { - Dali::Actor child = actor.GetChildAt( i ); - Actor& childImpl = GetImplementation( child ); + Dali::Actor child = actor.GetChildAt(i); + Actor& childImpl = GetImplementation(child); - if( childImpl.RelayoutDependentOnParent( dimension ) ) + if(childImpl.RelayoutDependentOnParent(dimension)) { - PropagateFlags( child, dimension ); + PropagateFlags(child, dimension); } } } } -void RelayoutController::AddRequest( Dali::Actor& actor ) +void RelayoutController::AddRequest(Dali::Actor& actor) { - Internal::Actor* actorPtr = &GetImplementation( actor ); + Internal::Actor* actorPtr = &GetImplementation(actor); // Only add the rootActor if it is not already recorded - auto itr = std::find( mDirtyLayoutSubTrees.begin(), mDirtyLayoutSubTrees.end(), actorPtr ); + auto iter = mDirtyLayoutSubTrees.Find(actorPtr); - if( itr == mDirtyLayoutSubTrees.end() ) + if(iter == mDirtyLayoutSubTrees.End()) { - mDirtyLayoutSubTrees.PushBack( actorPtr ); + mDirtyLayoutSubTrees.PushBack(actorPtr); } } -void RelayoutController::RemoveRequest( Dali::Actor& actor ) +void RelayoutController::RemoveRequest(Dali::Actor& actor) { - Internal::Actor* actorPtr = &GetImplementation( actor ); - - mDirtyLayoutSubTrees.Erase( std::remove( mDirtyLayoutSubTrees.begin(), - mDirtyLayoutSubTrees.end(), - actorPtr ), - mDirtyLayoutSubTrees.end() ); + Internal::Actor* actorPtr = &GetImplementation(actor); + mDirtyLayoutSubTrees.EraseObject(actorPtr); } void RelayoutController::Request() { mRelayoutFlag = true; - if( !mRelayoutConnection ) + if(!mRelayoutConnection) { - ThreadLocalStorage::Get().GetObjectRegistry().ObjectDestroyedSignal().Connect( mSlotDelegate, &RelayoutController::OnObjectDestroyed ); + ThreadLocalStorage::Get().GetObjectRegistry().ObjectDestroyedSignal().Connect(mSlotDelegate, &RelayoutController::OnObjectDestroyed); mRelayoutConnection = true; } } -void RelayoutController::OnObjectDestroyed( const Dali::RefObject* object ) +void RelayoutController::OnObjectDestroyed(const Dali::RefObject* object) { - // Search for and null the object if found in the following lists - FindAndZero( mDirtyLayoutSubTrees, object ); + mDirtyLayoutSubTrees.EraseObject(static_cast(object)); } void RelayoutController::Relayout() { // Only do something when requested - if( mRelayoutFlag ) + if(mRelayoutFlag) { mPerformingRelayout = true; @@ -412,16 +419,16 @@ void RelayoutController::Relayout() // 1. Finds all top-level controls from the dirty list and allocate them the size of the scene // These controls are paired with the parent/scene size and added to the stack. - for( auto& dirtyActor : mDirtyLayoutSubTrees ) + for(auto& dirtyActor : mDirtyLayoutSubTrees) { // Need to test if actor is valid (could have been deleted and had the pointer cleared) - if( dirtyActor ) + if(dirtyActor) { // Only negotiate actors that are on the scene - if( dirtyActor->OnScene() ) + if(dirtyActor->OnScene()) { Internal::Actor* parent = dirtyActor->GetParent(); - QueueActor( dirtyActor, *mRelayoutStack, ( parent ) ? Vector2( parent->GetTargetSize() ) : dirtyActor->GetScene().GetSize() ); + QueueActor(dirtyActor, *mRelayoutStack, (parent) ? Vector2(parent->GetTargetSize()) : dirtyActor->GetScene().GetSize()); } } } @@ -429,29 +436,27 @@ void RelayoutController::Relayout() mDirtyLayoutSubTrees.Clear(); // 2. Iterate through the stack until it's empty. - if( mRelayoutStack->Size() > 0 ) + if(mRelayoutStack->Size() > 0) { + DALI_TRACE_SCOPE(gTraceFilter, "DALI_RELAYOUT"); PRINT_HIERARCHY; - while( mRelayoutStack->Size() > 0 ) + while(mRelayoutStack->Size() > 0) { Dali::Actor actor; - Vector2 size; - mRelayoutStack->Get( mRelayoutStack->Size() - 1, actor, size ); - Actor& actorImpl = GetImplementation( actor ); + Vector2 size; + + mRelayoutStack->GetBack(actor, size); + Actor& actorImpl = GetImplementation(actor); mRelayoutStack->PopBack(); - if( actorImpl.RelayoutRequired() ) + if(actorImpl.RelayoutRequired() && actorImpl.OnScene()) { - DALI_LOG_INFO( gLogFilter, Debug::General, "[Internal::RelayoutController::Relayout] Negotiating %p %s %s (%.2f, %.2f)\n", &actorImpl, actor.GetTypeName().c_str(), actor.GetProperty< std::string >( Dali::Actor::Property::NAME ).c_str(), size.width, size.height ); + DALI_LOG_INFO(gLogFilter, Debug::General, "[Internal::RelayoutController::Relayout] Negotiating %p %s %s (%.2f, %.2f)\n", &actorImpl, actor.GetTypeName().c_str(), actor.GetProperty(Dali::Actor::Property::NAME).c_str(), size.width, size.height); // 3. Negotiate the size with the current actor. Pass it an empty container which the actor // has to fill with all the actors it has not done any size negotiation for. - - actorImpl.NegotiateSize( size, *mRelayoutStack ); - - // Reset the flag so that size negotiation will respect the actor's original resize policy - actorImpl.SetUseAssignedSize( false ); + actorImpl.NegotiateSize(size, *mRelayoutStack); } } @@ -467,7 +472,7 @@ void RelayoutController::Relayout() // this algorithm needs more optimization as well } -void RelayoutController::SetEnabled( bool enabled ) +void RelayoutController::SetEnabled(bool enabled) { mEnabled = enabled; } @@ -477,21 +482,14 @@ bool RelayoutController::IsPerformingRelayout() const return mPerformingRelayout; } -void RelayoutController::SetProcessingCoreEvents( bool processingEvents ) +void RelayoutController::SetProcessingCoreEvents(bool processingEvents) { mProcessingCoreEvents = processingEvents; } -void RelayoutController::FindAndZero( const RawActorList& list, const Dali::RefObject* object ) +uint32_t RelayoutController::GetMemoryPoolCapacity() { - // Object has been destroyed so clear it from this list - for( auto& actor : list ) - { - if( actor && ( actor == object ) ) - { - actor = nullptr; // Reset the pointer in the list. We don't want to remove it in case something is iterating over the list. - } - } + return mRelayoutInfoAllocator.GetCapacity(); } } // namespace Internal