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:
Jeremy Ong
2021-08-17 12:10:57 -06:00
parent d15d40fec6
commit df9b4d4a2f
274 changed files with 1435 additions and 1965 deletions
@@ -33,7 +33,7 @@ namespace AzToolsFramework
bool BaseManipulator::OnLeftMouseDown(const ViewportInteraction::MouseInteraction& interaction, const float rayIntersectionDistance)
{
AZ_PROFILE_FUNCTION(AZ::Debug::ProfileCategory::AzToolsFramework);
AZ_PROFILE_FUNCTION(AzToolsFramework);
if (m_onLeftMouseDownImpl)
{
@@ -59,7 +59,7 @@ namespace AzToolsFramework
bool BaseManipulator::OnRightMouseDown(const ViewportInteraction::MouseInteraction& interaction, const float rayIntersectionDistance)
{
AZ_PROFILE_FUNCTION(AZ::Debug::ProfileCategory::AzToolsFramework);
AZ_PROFILE_FUNCTION(AzToolsFramework);
if (m_onRightMouseDownImpl)
{
@@ -87,7 +87,7 @@ namespace AzToolsFramework
// attached as no active manipulator will have been set in ManipulatorManager.
void BaseManipulator::OnLeftMouseUp(const ViewportInteraction::MouseInteraction& interaction)
{
AZ_PROFILE_FUNCTION(AZ::Debug::ProfileCategory::AzToolsFramework);
AZ_PROFILE_FUNCTION(AzToolsFramework);
SetBoundsDirty();
@@ -98,7 +98,7 @@ namespace AzToolsFramework
void BaseManipulator::OnRightMouseUp(const ViewportInteraction::MouseInteraction& interaction)
{
AZ_PROFILE_FUNCTION(AZ::Debug::ProfileCategory::AzToolsFramework);
AZ_PROFILE_FUNCTION(AzToolsFramework);
SetBoundsDirty();
@@ -109,7 +109,7 @@ namespace AzToolsFramework
bool BaseManipulator::OnMouseOver(const ManipulatorId manipulatorId, const ViewportInteraction::MouseInteraction& interaction)
{
AZ_PROFILE_FUNCTION(AZ::Debug::ProfileCategory::AzToolsFramework);
AZ_PROFILE_FUNCTION(AzToolsFramework);
UpdateMouseOver(manipulatorId);
OnMouseOverImpl(manipulatorId, interaction);
@@ -125,7 +125,7 @@ namespace AzToolsFramework
void BaseManipulator::OnMouseMove(const ViewportInteraction::MouseInteraction& interaction)
{
AZ_PROFILE_FUNCTION(AZ::Debug::ProfileCategory::AzToolsFramework);
AZ_PROFILE_FUNCTION(AzToolsFramework);
if (!m_performingAction)
{
@@ -142,7 +142,7 @@ namespace AzToolsFramework
void BaseManipulator::SetBoundsDirty()
{
AZ_PROFILE_FUNCTION(AZ::Debug::ProfileCategory::AzToolsFramework);
AZ_PROFILE_FUNCTION(AzToolsFramework);
SetBoundsDirtyImpl();
}
@@ -190,7 +190,7 @@ namespace AzToolsFramework
void BaseManipulator::EndAction()
{
AZ_PROFILE_FUNCTION(AZ::Debug::ProfileCategory::AzToolsFramework);
AZ_PROFILE_FUNCTION(AzToolsFramework);
if (!m_performingAction)
{
@@ -235,7 +235,7 @@ namespace AzToolsFramework
void BaseManipulator::NotifyEntityComponentPropertyChanged()
{
AZ_PROFILE_FUNCTION(AZ::Debug::ProfileCategory::AzToolsFramework);
AZ_PROFILE_FUNCTION(AzToolsFramework);
for (const AZ::EntityComponentIdPair& entityComponentIdPair : m_entityComponentIdPairs)
{
@@ -268,7 +268,7 @@ namespace AzToolsFramework
AZStd::unordered_set<AZ::EntityComponentIdPair>::iterator BaseManipulator::RemoveEntityId(const AZ::EntityId entityId)
{
AZ_PROFILE_FUNCTION(AZ::Debug::ProfileCategory::AzToolsFramework);
AZ_PROFILE_FUNCTION(AzToolsFramework);
auto afterErased = m_entityComponentIdPairs.end();
@@ -297,7 +297,7 @@ namespace AzToolsFramework
AZStd::unordered_set<AZ::EntityComponentIdPair>::iterator BaseManipulator::RemoveEntityComponentIdPair(
const AZ::EntityComponentIdPair& entityComponentIdPair)
{
AZ_PROFILE_FUNCTION(AZ::Debug::ProfileCategory::AzToolsFramework);
AZ_PROFILE_FUNCTION(AzToolsFramework);
const auto entityIdIt = m_entityComponentIdPairs.find(entityComponentIdPair);
@@ -147,7 +147,7 @@ namespace AzToolsFramework
const AZ::Vector3& localManipulatorStartPosition,
const AZ::Vector3& localManipulatorOffset)
{
AZ_PROFILE_FUNCTION(AZ::Debug::ProfileCategory::AzToolsFramework);
AZ_PROFILE_FUNCTION(AzToolsFramework);
// bind FixedVerticesRequestBus for improved performance
typename AZ::FixedVerticesRequestBus<Vertex>::BusPtr fixedVertices;
@@ -180,7 +180,7 @@ namespace AzToolsFramework
template<typename Vertex>
void InitializeVertexLookup(IndexedTranslationManipulator<Vertex>& translationManipulator, const AZ::EntityId entityId)
{
AZ_PROFILE_FUNCTION(AZ::Debug::ProfileCategory::AzToolsFramework);
AZ_PROFILE_FUNCTION(AzToolsFramework);
// bind FixedVerticesRequestBus for improved performance
typename AZ::FixedVerticesRequestBus<Vertex>::BusPtr fixedVertices;
@@ -210,7 +210,7 @@ namespace AzToolsFramework
const Vertex& vertex,
size_t vertexIndex)
{
AZ_PROFILE_FUNCTION(AZ::Debug::ProfileCategory::AzToolsFramework);
AZ_PROFILE_FUNCTION(AzToolsFramework);
// if we have a vertex (translation) manipulator active, ensure
// it gets removed when clicking on another selection manipulator
@@ -342,7 +342,7 @@ namespace AzToolsFramework
const EditorBoxSelect& editorBoxSelect,
const AZStd::vector<AZStd::shared_ptr<SelectionManipulator>>& selectionManipulators)
{
AZ_PROFILE_FUNCTION(AZ::Debug::ProfileCategory::AzToolsFramework);
AZ_PROFILE_FUNCTION(AzToolsFramework);
// refresh selection manipulators and box select data when modifiers change
// (switching from additive to subtractive)
@@ -481,7 +481,7 @@ namespace AzToolsFramework
const TranslationManipulators::Dimensions dimensions,
const TranslationManipulatorConfiguratorFn translationManipulatorConfigurator)
{
AZ_PROFILE_FUNCTION(AZ::Debug::ProfileCategory::AzToolsFramework);
AZ_PROFILE_FUNCTION(AzToolsFramework);
m_dimensions = dimensions;
m_manipulatorManagerId = managerId;
@@ -705,7 +705,7 @@ namespace AzToolsFramework
template<typename Vertex>
void EditorVertexSelectionBase<Vertex>::ClearSelected()
{
AZ_PROFILE_FUNCTION(AZ::Debug::ProfileCategory::AzToolsFramework);
AZ_PROFILE_FUNCTION(AzToolsFramework);
// if translation manipulator is active, remove it when receiving this event and enable
// the hover manipulator bounds again so points can be inserted again
@@ -736,7 +736,7 @@ namespace AzToolsFramework
void EditorVertexSelectionBase<Vertex>::DisplayEntityViewport(
const AzFramework::ViewportInfo& viewportInfo, AzFramework::DebugDisplayRequests& debugDisplay)
{
AZ_PROFILE_FUNCTION(AZ::Debug::ProfileCategory::AzToolsFramework);
AZ_PROFILE_FUNCTION(AzToolsFramework);
m_editorBoxSelect.DisplayScene(viewportInfo, debugDisplay);
@@ -747,7 +747,7 @@ namespace AzToolsFramework
void EditorVertexSelectionBase<Vertex>::DisplayViewport2d(
const AzFramework::ViewportInfo& viewportInfo, AzFramework::DebugDisplayRequests& debugDisplay)
{
AZ_PROFILE_FUNCTION(AZ::Debug::ProfileCategory::AzToolsFramework);
AZ_PROFILE_FUNCTION(AzToolsFramework);
m_editorBoxSelect.Display2d(viewportInfo, debugDisplay);
}
@@ -756,7 +756,7 @@ namespace AzToolsFramework
template<typename V, typename AZStd::enable_if<AZStd::is_same<V, AZ::Vector3>::value>::type*>
void EditorVertexSelectionBase<Vertex>::UpdateManipulatorSpace(const AzFramework::ViewportInfo& viewportInfo)
{
AZ_PROFILE_FUNCTION(AZ::Debug::ProfileCategory::AzToolsFramework);
AZ_PROFILE_FUNCTION(AzToolsFramework);
// check if 'shift' is being held to move to parent space
bool worldSpace = false;
@@ -803,7 +803,7 @@ namespace AzToolsFramework
template<typename Vertex>
void EditorVertexSelectionVariable<Vertex>::DestroySelected()
{
AZ_PROFILE_FUNCTION(AZ::Debug::ProfileCategory::AzToolsFramework);
AZ_PROFILE_FUNCTION(AzToolsFramework);
const AZ::EntityId entityId = EditorVertexSelectionBase<Vertex>::GetEntityId();
@@ -855,7 +855,7 @@ namespace AzToolsFramework
template<typename Vertex>
void EditorVertexSelectionBase<Vertex>::SetSelectedPosition(const AZ::Vector3& localPosition)
{
AZ_PROFILE_FUNCTION(AZ::Debug::ProfileCategory::AzToolsFramework);
AZ_PROFILE_FUNCTION(AzToolsFramework);
if (m_translationManipulator)
{
@@ -884,7 +884,7 @@ namespace AzToolsFramework
template<typename Vertex>
void EditorVertexSelectionBase<Vertex>::RefreshTranslationManipulator()
{
AZ_PROFILE_FUNCTION(AZ::Debug::ProfileCategory::AzToolsFramework);
AZ_PROFILE_FUNCTION(AzToolsFramework);
// bind FixedVerticesRequestBus for improved performance
typename AZ::FixedVerticesRequestBus<Vertex>::BusPtr fixedVertices;
@@ -915,7 +915,7 @@ namespace AzToolsFramework
template<typename Vertex>
void EditorVertexSelectionBase<Vertex>::RefreshLocal()
{
AZ_PROFILE_FUNCTION(AZ::Debug::ProfileCategory::AzToolsFramework);
AZ_PROFILE_FUNCTION(AzToolsFramework);
// we do not want to refresh our local state while a batch movement is in progress,
// even if we have been signalled to do so by a callback
@@ -955,7 +955,7 @@ namespace AzToolsFramework
template<typename Vertex>
void EditorVertexSelectionBase<Vertex>::RefreshSpace(const AZ::Transform& worldFromLocal, const AZ::Vector3& nonUniformScale)
{
AZ_PROFILE_FUNCTION(AZ::Debug::ProfileCategory::AzToolsFramework);
AZ_PROFILE_FUNCTION(AzToolsFramework);
for (auto& manipulator : m_selectionManipulators)
{
@@ -982,7 +982,7 @@ namespace AzToolsFramework
template<typename Vertex>
void EditorVertexSelectionBase<Vertex>::SetBoundsDirty()
{
AZ_PROFILE_FUNCTION(AZ::Debug::ProfileCategory::AzToolsFramework);
AZ_PROFILE_FUNCTION(AzToolsFramework);
for (auto& manipulator : m_selectionManipulators)
{
@@ -1008,7 +1008,7 @@ namespace AzToolsFramework
const AZ::EntityComponentIdPair& entityComponentIdPair,
const ManipulatorManagerId managerId)
{
AZ_PROFILE_FUNCTION(AZ::Debug::ProfileCategory::AzToolsFramework);
AZ_PROFILE_FUNCTION(AzToolsFramework);
Vertex vertex;
bool found = false;
@@ -1078,7 +1078,7 @@ namespace AzToolsFramework
const ManipulatorManagerId managerId,
const size_t vertexIndex)
{
AZ_PROFILE_FUNCTION(AZ::Debug::ProfileCategory::AzToolsFramework);
AZ_PROFILE_FUNCTION(AzToolsFramework);
// setup selection manipulator
const AZStd::shared_ptr<ManipulatorViewSphere> selectionView = AzToolsFramework::CreateManipulatorViewSphere(
@@ -1115,7 +1115,7 @@ namespace AzToolsFramework
const ManipulatorManagerId managerId,
const size_t vertexIndex)
{
AZ_PROFILE_FUNCTION(AZ::Debug::ProfileCategory::AzToolsFramework);
AZ_PROFILE_FUNCTION(AzToolsFramework);
// setup selection manipulator
const AZStd::shared_ptr<ManipulatorViewSphere> manipulatorView = AzToolsFramework::CreateManipulatorViewSphere(
@@ -1223,7 +1223,7 @@ namespace AzToolsFramework
Vertex EditorVertexSelectionVariable<Vertex>::InsertSelectedInPlace(
AZStd::vector<typename IndexedTranslationManipulator<Vertex>::VertexLookup>& manipulators)
{
AZ_PROFILE_FUNCTION(AZ::Debug::ProfileCategory::AzToolsFramework);
AZ_PROFILE_FUNCTION(AzToolsFramework);
// utility to calculate the center point of the selected vertices after duplication
MidpointCalculator midpointCalculator;
@@ -1267,7 +1267,7 @@ namespace AzToolsFramework
template<typename Vertex>
void EditorVertexSelectionVariable<Vertex>::DuplicateSelected()
{
AZ_PROFILE_FUNCTION(AZ::Debug::ProfileCategory::AzToolsFramework);
AZ_PROFILE_FUNCTION(AzToolsFramework);
ScopedUndoBatch duplicateUndo("Duplicate Vertices");
ScopedUndoBatch::MarkEntityDirty(EditorVertexSelectionBase<Vertex>::GetEntityId());
@@ -1346,7 +1346,7 @@ namespace AzToolsFramework
template<typename Vertex>
void InsertVertexAfter(const AZ::EntityComponentIdPair& entityComponentIdPair, const size_t vertexIndex, const Vertex& localPosition)
{
AZ_PROFILE_FUNCTION(AZ::Debug::ProfileCategory::AzToolsFramework);
AZ_PROFILE_FUNCTION(AzToolsFramework);
size_t size = 0;
AZ::VariableVerticesRequestBus<Vertex>::EventResult(
@@ -74,7 +74,7 @@ namespace AzToolsFramework
Picking::RegisteredBoundId ManipulatorManager::UpdateBound(
const ManipulatorId manipulatorId, const Picking::RegisteredBoundId boundId, const Picking::BoundRequestShapeBase& boundShapeData)
{
AZ_PROFILE_FUNCTION(AZ::Debug::ProfileCategory::AzToolsFramework);
AZ_PROFILE_FUNCTION(AzToolsFramework);
if (manipulatorId == InvalidManipulatorId)
{
@@ -124,7 +124,7 @@ namespace AzToolsFramework
void ManipulatorManager::RefreshMouseOverState(const ViewportInteraction::MousePick& mousePick)
{
AZ_PROFILE_FUNCTION(AZ::Debug::ProfileCategory::AzToolsFramework);
AZ_PROFILE_FUNCTION(AzToolsFramework);
if (!Interacting())
{
@@ -142,7 +142,7 @@ namespace AzToolsFramework
const AzFramework::CameraState& cameraState,
const ViewportInteraction::MouseInteraction& mouseInteraction)
{
AZ_PROFILE_FUNCTION(AZ::Debug::ProfileCategory::AzToolsFramework);
AZ_PROFILE_FUNCTION(AzToolsFramework);
for (const auto& pair : m_manipulatorIdToPtrMap)
{
@@ -155,7 +155,7 @@ namespace AzToolsFramework
AZStd::shared_ptr<BaseManipulator> ManipulatorManager::PerformRaycast(
const AZ::Vector3& rayOrigin, const AZ::Vector3& rayDirection, float& rayIntersectionDistance)
{
AZ_PROFILE_FUNCTION(AZ::Debug::ProfileCategory::AzToolsFramework);
AZ_PROFILE_FUNCTION(AzToolsFramework);
Picking::RaySelectInfo raySelection;
raySelection.m_origin = rayOrigin;
@@ -255,7 +255,7 @@ namespace AzToolsFramework
ManipulatorManager::ConsumeMouseMoveResult ManipulatorManager::ConsumeViewportMouseMove(
const ViewportInteraction::MouseInteraction& interaction)
{
AZ_PROFILE_FUNCTION(AZ::Debug::ProfileCategory::AzToolsFramework);
AZ_PROFILE_FUNCTION(AzToolsFramework);
if (m_activeManipulator)
{
@@ -279,7 +279,7 @@ namespace AzToolsFramework
void ManipulatorManager::OnEntityInfoUpdatedVisibility(const AZ::EntityId entityId, const bool visible)
{
AZ_PROFILE_FUNCTION(AZ::Debug::ProfileCategory::AzToolsFramework);
AZ_PROFILE_FUNCTION(AzToolsFramework);
for (auto& pair : m_manipulatorIdToPtrMap)
{