Deprecate profiler categories based on global enum
(to be supplanted by registered budgets in the future) Signed-off-by: Jeremy Ong <jcong@amazon.com>
This commit is contained in:
@@ -95,7 +95,7 @@ namespace AzToolsFramework
|
||||
template<typename IdContainerType>
|
||||
void DeleteEntities(const IdContainerType& entityIds)
|
||||
{
|
||||
AZ_PROFILE_FUNCTION(AZ::Debug::ProfileCategory::AzToolsFramework);
|
||||
AZ_PROFILE_FUNCTION(AzToolsFramework);
|
||||
|
||||
if (entityIds.empty())
|
||||
{
|
||||
@@ -141,7 +141,7 @@ namespace AzToolsFramework
|
||||
}
|
||||
|
||||
{
|
||||
AZ_PROFILE_SCOPE(AZ::Debug::ProfileCategory::AzToolsFramework, "Internal::DeleteEntities:UndoCaptureAndPurgeEntities");
|
||||
AZ_PROFILE_SCOPE(AzToolsFramework, "Internal::DeleteEntities:UndoCaptureAndPurgeEntities");
|
||||
for (const auto& entityId : entityIds)
|
||||
{
|
||||
AZ::Entity* entity = NULL;
|
||||
@@ -160,7 +160,7 @@ namespace AzToolsFramework
|
||||
|
||||
selCommand->SetParent(currentUndoBatch);
|
||||
{
|
||||
AZ_PROFILE_SCOPE(AZ::Debug::ProfileCategory::AzToolsFramework, "Internal::DeleteEntities:RunRedo");
|
||||
AZ_PROFILE_SCOPE(AzToolsFramework, "Internal::DeleteEntities:RunRedo");
|
||||
selCommand->RunRedo();
|
||||
}
|
||||
}
|
||||
@@ -458,7 +458,7 @@ namespace AzToolsFramework
|
||||
|
||||
bool ToolsApplication::RemoveEntity(AZ::Entity* entity)
|
||||
{
|
||||
AZ_PROFILE_FUNCTION(AZ::Debug::ProfileCategory::AzToolsFramework);
|
||||
AZ_PROFILE_FUNCTION(AzToolsFramework);
|
||||
|
||||
auto undoCacheInterface = AZ::Interface<UndoSystem::UndoCacheInterface>::Get();
|
||||
if (undoCacheInterface)
|
||||
@@ -472,7 +472,7 @@ namespace AzToolsFramework
|
||||
EBUS_EVENT(ToolsApplicationEvents::Bus, EntityDeregistered, entity->GetId());
|
||||
|
||||
{
|
||||
AZ_PROFILE_SCOPE(AZ::Debug::ProfileCategory::AzToolsFramework, "ToolsApplication::RemoveEntity:CallApplicationRemoveEntity");
|
||||
AZ_PROFILE_SCOPE(AzToolsFramework, "ToolsApplication::RemoveEntity:CallApplicationRemoveEntity");
|
||||
if (AzFramework::Application::RemoveEntity(entity))
|
||||
{
|
||||
return true;
|
||||
@@ -545,7 +545,7 @@ namespace AzToolsFramework
|
||||
|
||||
void ToolsApplication::MarkEntitySelected(AZ::EntityId entityId)
|
||||
{
|
||||
AZ_PROFILE_FUNCTION(AZ::Debug::ProfileCategory::AzToolsFramework);
|
||||
AZ_PROFILE_FUNCTION(AzToolsFramework);
|
||||
AZ_Assert(entityId.IsValid(), "Invalid entity Id being marked as selected.");
|
||||
|
||||
EntityIdList::iterator foundIter = AZStd::find(m_selectedEntities.begin(), m_selectedEntities.end(), entityId);
|
||||
@@ -563,7 +563,7 @@ namespace AzToolsFramework
|
||||
|
||||
void ToolsApplication::MarkEntitiesSelected(const EntityIdList& entitiesToSelect)
|
||||
{
|
||||
AZ_PROFILE_FUNCTION(AZ::Debug::ProfileCategory::AzToolsFramework);
|
||||
AZ_PROFILE_FUNCTION(AzToolsFramework);
|
||||
|
||||
EntityIdList entitiesSelected;
|
||||
entitiesSelected.reserve(entitiesToSelect.size());
|
||||
@@ -587,11 +587,11 @@ namespace AzToolsFramework
|
||||
|
||||
void ToolsApplication::MarkEntityDeselected(AZ::EntityId entityId)
|
||||
{
|
||||
AZ_PROFILE_FUNCTION(AZ::Debug::ProfileCategory::AzToolsFramework);
|
||||
AZ_PROFILE_FUNCTION(AzToolsFramework);
|
||||
auto foundIter = AZStd::find(m_selectedEntities.begin(), m_selectedEntities.end(), entityId);
|
||||
if (foundIter != m_selectedEntities.end())
|
||||
{
|
||||
AZ_PROFILE_SCOPE(AZ::Debug::ProfileCategory::AzToolsFramework, "ToolsApplication::MarkEntityDeselected:Deselect");
|
||||
AZ_PROFILE_SCOPE(AzToolsFramework, "ToolsApplication::MarkEntityDeselected:Deselect");
|
||||
ToolsApplicationEvents::Bus::Broadcast(&ToolsApplicationEvents::BeforeEntitySelectionChanged);
|
||||
m_selectedEntities.erase(foundIter);
|
||||
|
||||
@@ -603,7 +603,7 @@ namespace AzToolsFramework
|
||||
|
||||
void ToolsApplication::MarkEntitiesDeselected(const EntityIdList& entitiesToDeselect)
|
||||
{
|
||||
AZ_PROFILE_FUNCTION(AZ::Debug::ProfileCategory::AzToolsFramework);
|
||||
AZ_PROFILE_FUNCTION(AzToolsFramework);
|
||||
|
||||
ToolsApplicationEvents::Bus::Broadcast(&ToolsApplicationEvents::BeforeEntitySelectionChanged);
|
||||
|
||||
@@ -633,14 +633,14 @@ namespace AzToolsFramework
|
||||
|
||||
void ToolsApplication::SetEntityHighlighted(AZ::EntityId entityId, bool highlighted)
|
||||
{
|
||||
AZ_PROFILE_FUNCTION(AZ::Debug::ProfileCategory::AzToolsFramework);
|
||||
AZ_PROFILE_FUNCTION(AzToolsFramework);
|
||||
|
||||
auto foundIter = AZStd::find(m_highlightedEntities.begin(), m_highlightedEntities.end(), entityId);
|
||||
if (foundIter != m_highlightedEntities.end())
|
||||
{
|
||||
if (!highlighted)
|
||||
{
|
||||
AZ_PROFILE_SCOPE(AZ::Debug::ProfileCategory::AzToolsFramework, "ToolsApplication::SetEntityHighlighted:RemoveHighlight");
|
||||
AZ_PROFILE_SCOPE(AzToolsFramework, "ToolsApplication::SetEntityHighlighted:RemoveHighlight");
|
||||
ToolsApplicationEvents::Bus::Broadcast(&ToolsApplicationEvents::BeforeEntityHighlightingChanged);
|
||||
m_highlightedEntities.erase(foundIter);
|
||||
ToolsApplicationEvents::Bus::Broadcast(&ToolsApplicationEvents::AfterEntityHighlightingChanged);
|
||||
@@ -648,7 +648,7 @@ namespace AzToolsFramework
|
||||
}
|
||||
else if (highlighted)
|
||||
{
|
||||
AZ_PROFILE_SCOPE(AZ::Debug::ProfileCategory::AzToolsFramework, "ToolsApplication::SetEntityHighlighted:AddHighlight");
|
||||
AZ_PROFILE_SCOPE(AzToolsFramework, "ToolsApplication::SetEntityHighlighted:AddHighlight");
|
||||
ToolsApplicationEvents::Bus::Broadcast(&ToolsApplicationEvents::BeforeEntityHighlightingChanged);
|
||||
m_highlightedEntities.push_back(entityId);
|
||||
ToolsApplicationEvents::Bus::Broadcast(&ToolsApplicationEvents::AfterEntityHighlightingChanged);
|
||||
@@ -657,7 +657,7 @@ namespace AzToolsFramework
|
||||
|
||||
void ToolsApplication::SetSelectedEntities(const EntityIdList& selectedEntities)
|
||||
{
|
||||
AZ_PROFILE_FUNCTION(AZ::Debug::ProfileCategory::AzToolsFramework);
|
||||
AZ_PROFILE_FUNCTION(AzToolsFramework);
|
||||
|
||||
// We're setting the selection set as a batch from an external caller.
|
||||
// * Filter out any unselectable entities
|
||||
@@ -1535,7 +1535,7 @@ namespace AzToolsFramework
|
||||
|
||||
void ToolsApplication::CreateUndosForDirtyEntities()
|
||||
{
|
||||
AZ_PROFILE_FUNCTION(AZ::Debug::ProfileCategory::AzToolsFramework);
|
||||
AZ_PROFILE_FUNCTION(AzToolsFramework);
|
||||
|
||||
AZ_Assert(!m_isDuringUndoRedo, "Cannot add dirty entities during undo/redo.");
|
||||
if (m_dirtyEntities.empty())
|
||||
|
||||
Reference in New Issue
Block a user