bool& refObjectDestroyedBoolean;
};
-ObjectDestructionTracker::ObjectDestructionTracker()
- :mRefObjectDestroyed( false)
+ObjectDestructionTracker::ObjectDestructionTracker( ObjectRegistry objectRegistry )
+: mObjectRegistry( objectRegistry ),
+ mRefObjectDestroyed( false)
{
}
void ObjectDestructionTracker::Start( Actor actor )
{
ObjectDestructionFunctor destructionFunctor( actor.GetObjectPtr(), mRefObjectDestroyed );
-
- ObjectRegistry objectRegistry = Stage::GetCurrent().GetObjectRegistry();
- objectRegistry.ObjectDestroyedSignal().Connect( this, destructionFunctor );
+ mObjectRegistry.ObjectDestroyedSignal().Connect( this, destructionFunctor );
}
bool ObjectDestructionTracker::IsDestroyed()
/**
* @brief Call in main part of code
+ * @param[in] objectRegistry The object Registry being used
*/
- ObjectDestructionTracker();
+ ObjectDestructionTracker( ObjectRegistry objectRegistry );
/**
* @brief Call in sub bock of code where the Actor being checked is still alive.
bool IsDestroyed();
private:
+ ObjectRegistry mObjectRegistry;
bool mRefObjectDestroyed;
};
// INTERNAL INCLUDES
#include <dali/public-api/dali-adaptor-common.h>
#include <dali/internal/accessibility/tizen-wayland/atspi/accessibility-impl.h>
+#include <dali/internal/adaptor/common/adaptor-impl.h>
using namespace Dali::Accessibility;
using namespace Dali;
{
if( nonControlAccessibles.empty() )
{
- auto registry = Dali::Stage::GetCurrent().GetObjectRegistry();
+ auto registry = Adaptor::Get().GetObjectRegistry();
registry.ObjectDestroyedSignal().Connect( []( const Dali::RefObject* obj )
{
nonControlAccessibles.erase( obj );
const unsigned int timeInterval = mEnvironmentOptions->GetObjectProfilerInterval();
if( 0u < timeInterval )
{
- mObjectProfiler = new ObjectProfiler( timeInterval );
+ mObjectProfiler = new ObjectProfiler( mCore->GetObjectRegistry(), timeInterval );
}
mNotificationTrigger = TriggerEventFactory::CreateTriggerEvent( MakeCallback( this, &Adaptor::ProcessCoreEvents ), TriggerEventInterface::KEEP_ALIVE_AFTER_TRIGGER);
#include <stdlib.h>
#include <dali/integration-api/debug.h>
#include <dali/integration-api/profiling.h>
-#include <dali/public-api/common/stage.h>
#include <dali/public-api/object/ref-object.h>
#include <dali/public-api/object/base-object.h>
#include <dali/public-api/object/type-registry.h>
namespace Adaptor
{
-ObjectProfiler::ObjectProfiler( uint32_t timeInterval )
+ObjectProfiler::ObjectProfiler( Dali::ObjectRegistry objectRegistry, uint32_t timeInterval )
+: mObjectRegistry( objectRegistry )
{
// This class must be created after the Stage; this means it doesn't count the initial objects
// that are created by the stage (base layer, default camera actor)
- mObjectRegistry = Dali::Stage::GetCurrent().GetObjectRegistry();
mTimer = Dali::Timer::New( timeInterval * 1000 );
mTimer.TickSignal().Connect( this, &ObjectProfiler::OnTimeout );
#define DALI_ADAPTOR_OBJECT_PROFILER_H
/*
- * Copyright (c) 2019 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2020 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.
/**
* Constructor
+ * @param objectRegistry The objectRegistry
* @param timeInterval to specify the frequency of reporting
*/
- ObjectProfiler( uint32_t timeInterval );
+ ObjectProfiler( Dali::ObjectRegistry objectRegistry, uint32_t timeInterval );
/**
* Destructor