From 90509c7fa20068f7dbe271aa08b8864a59ff3aa5 Mon Sep 17 00:00:00 2001 From: AMZN-ScottR <24445312+AMZN-ScottR@users.noreply.github.com> Date: Thu, 28 Oct 2021 14:18:04 -0700 Subject: [PATCH] [profiler_capture_api] removed now unnecessary ProfilerRequests EBus alias after AZ::Interface conversion Signed-off-by: AMZN-ScottR <24445312+AMZN-ScottR@users.noreply.github.com> --- Code/Framework/AzCore/AzCore/Debug/ProfilerBus.h | 13 ------------- .../Code/Source/ProfilerSystemComponent.cpp | 4 ---- Gems/Profiler/Code/Source/ProfilerSystemComponent.h | 4 ++-- 3 files changed, 2 insertions(+), 19 deletions(-) diff --git a/Code/Framework/AzCore/AzCore/Debug/ProfilerBus.h b/Code/Framework/AzCore/AzCore/Debug/ProfilerBus.h index 9194381e23..322bfb60c2 100644 --- a/Code/Framework/AzCore/AzCore/Debug/ProfilerBus.h +++ b/Code/Framework/AzCore/AzCore/Debug/ProfilerBus.h @@ -60,20 +60,7 @@ namespace AZ virtual bool EndCapture() = 0; }; - class ProfilerRequestsTraits - : public AZ::EBusTraits - { - public: - // EBusTraits overrides - static constexpr AZ::EBusHandlerPolicy HandlerPolicy = AZ::EBusHandlerPolicy::Single; - static constexpr AZ::EBusAddressPolicy AddressPolicy = AZ::EBusAddressPolicy::Single; - - // Allow multiple threads to concurrently make requests - using MutexType = AZStd::mutex; - }; - using ProfilerSystemInterface = AZ::Interface; - using ProfilerRequestBus = AZ::EBus; //! helper function for getting the profiler capture location from the settings registry that //! includes fallback handing in the event the registry value can't be determined diff --git a/Gems/Profiler/Code/Source/ProfilerSystemComponent.cpp b/Gems/Profiler/Code/Source/ProfilerSystemComponent.cpp index 4deda64964..24da9e050e 100644 --- a/Gems/Profiler/Code/Source/ProfilerSystemComponent.cpp +++ b/Gems/Profiler/Code/Source/ProfilerSystemComponent.cpp @@ -144,8 +144,6 @@ namespace Profiler void ProfilerSystemComponent::Activate() { - AZ::Debug::ProfilerRequestBus::Handler::BusConnect(); - m_cpuProfiler.Init(); } @@ -153,8 +151,6 @@ namespace Profiler { m_cpuProfiler.Shutdown(); - AZ::Debug::ProfilerRequestBus::Handler::BusDisconnect(); - // Block deactivation until the IO thread has finished serializing the CPU data if (m_cpuDataSerializationThread.joinable()) { diff --git a/Gems/Profiler/Code/Source/ProfilerSystemComponent.h b/Gems/Profiler/Code/Source/ProfilerSystemComponent.h index 000b11cfdf..a1c8c47479 100644 --- a/Gems/Profiler/Code/Source/ProfilerSystemComponent.h +++ b/Gems/Profiler/Code/Source/ProfilerSystemComponent.h @@ -18,7 +18,7 @@ namespace Profiler { class ProfilerSystemComponent : public AZ::Component - , protected AZ::Debug::ProfilerRequestBus::Handler + , protected AZ::Debug::ProfilerRequests { public: AZ_COMPONENT(ProfilerSystemComponent, "{3f52c1d7-d920-4781-8ed7-88077ec4f305}"); @@ -38,7 +38,7 @@ namespace Profiler void Activate() override; void Deactivate() override; - // ProfilerRequestBus interface implementation + // ProfilerRequests interface implementation bool IsActive() const override; void SetActive(bool active) override; bool CaptureFrame(const AZStd::string& outputFilePath) override;