*/
// CLASS HEADER
-#include "relayout-controller-impl.h"
+#include <dali/internal/event/size-negotiation/relayout-controller-impl.h>
// EXTERNAL INCLUDES
#if defined(DEBUG_ENABLED)
{
// Make space for 32 controls to avoid having to copy construct a lot in the beginning
mRelayoutStack->Reserve(32);
+ mPotentialRedundantSubRoots.reserve(32);
+ mTopOfSubTreeStack.reserve(32);
}
RelayoutController::~RelayoutController() = default;
return;
}
- std::vector<Dali::Actor> potentialRedundantSubRoots;
- std::vector<Dali::Actor> topOfSubTreeStack;
+ std::vector<Dali::Actor>& potentialRedundantSubRoots = mPotentialRedundantSubRoots;
+ std::vector<Dali::Actor>& topOfSubTreeStack = mTopOfSubTreeStack;
+
+ 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);
RemoveRequest(subRoot);
}
+ potentialRedundantSubRoots.clear();
+
if(!mProcessingCoreEvents)
{
mRenderController.RequestProcessEventsOnIdle(false);