From 02754ccbd04f37670b3d041dbd38c43ad74dab31 Mon Sep 17 00:00:00 2001 From: AMZN-ScottR <24445312+AMZN-ScottR@users.noreply.github.com> Date: Tue, 19 Oct 2021 10:44:14 -0700 Subject: [PATCH] [atom_cpu_profiler_gem_promotion] more quick small changes based on PR feedback Signed-off-by: AMZN-ScottR <24445312+AMZN-ScottR@users.noreply.github.com> --- Gems/Profiler/Code/Include/Profiler/ProfilerImGuiBus.h | 10 ---------- .../Code/Source/ProfilerImGuiSystemComponent.cpp | 2 -- .../Code/Source/ProfilerImGuiSystemComponent.h | 4 ++-- Gems/Profiler/Code/Source/ProfilerSystemComponent.cpp | 1 - 4 files changed, 2 insertions(+), 15 deletions(-) diff --git a/Gems/Profiler/Code/Include/Profiler/ProfilerImGuiBus.h b/Gems/Profiler/Code/Include/Profiler/ProfilerImGuiBus.h index 1b50cc4185..b6a69ae7b5 100644 --- a/Gems/Profiler/Code/Include/Profiler/ProfilerImGuiBus.h +++ b/Gems/Profiler/Code/Include/Profiler/ProfilerImGuiBus.h @@ -23,15 +23,5 @@ namespace Profiler virtual void ShowCpuProfilerWindow(bool& keepDrawing) = 0; }; - class ProfilerImGuiBusTraits - : public AZ::EBusTraits - { - public: - // EBusTraits overrides - static constexpr AZ::EBusHandlerPolicy HandlerPolicy = AZ::EBusHandlerPolicy::Single; - static constexpr AZ::EBusAddressPolicy AddressPolicy = AZ::EBusAddressPolicy::Single; - }; - using ProfilerImGuiInterface = AZ::Interface; - using ProfilerImGuiRequestBus = AZ::EBus; } // namespace Profiler diff --git a/Gems/Profiler/Code/Source/ProfilerImGuiSystemComponent.cpp b/Gems/Profiler/Code/Source/ProfilerImGuiSystemComponent.cpp index ea7414a82a..62d27a1806 100644 --- a/Gems/Profiler/Code/Source/ProfilerImGuiSystemComponent.cpp +++ b/Gems/Profiler/Code/Source/ProfilerImGuiSystemComponent.cpp @@ -76,7 +76,6 @@ namespace Profiler void ProfilerImGuiSystemComponent::Activate() { #if defined(IMGUI_ENABLED) - ProfilerImGuiRequestBus::Handler::BusConnect(); ImGui::ImGuiUpdateListenerBus::Handler::BusConnect(); #endif // defined(IMGUI_ENABLED) } @@ -84,7 +83,6 @@ namespace Profiler void ProfilerImGuiSystemComponent::Deactivate() { #if defined(IMGUI_ENABLED) - ProfilerImGuiRequestBus::Handler::BusDisconnect(); ImGui::ImGuiUpdateListenerBus::Handler::BusDisconnect(); #endif // defined(IMGUI_ENABLED) } diff --git a/Gems/Profiler/Code/Source/ProfilerImGuiSystemComponent.h b/Gems/Profiler/Code/Source/ProfilerImGuiSystemComponent.h index 04ac8db4ca..351197f961 100644 --- a/Gems/Profiler/Code/Source/ProfilerImGuiSystemComponent.h +++ b/Gems/Profiler/Code/Source/ProfilerImGuiSystemComponent.h @@ -24,7 +24,7 @@ namespace Profiler class ProfilerImGuiSystemComponent : public AZ::Component #if defined(IMGUI_ENABLED) - , public ProfilerImGuiRequestBus::Handler + , public ProfilerImGuiRequests , public ImGui::ImGuiUpdateListenerBus::Handler #endif // defined(IMGUI_ENABLED) { @@ -47,7 +47,7 @@ namespace Profiler void Deactivate() override; #if defined(IMGUI_ENABLED) - // ProfilerImGuiRequestBus interface implementation + // ProfilerImGuiRequests interface implementation void ShowCpuProfilerWindow(bool& keepDrawing) override; // ImGuiUpdateListenerBus overrides diff --git a/Gems/Profiler/Code/Source/ProfilerSystemComponent.cpp b/Gems/Profiler/Code/Source/ProfilerSystemComponent.cpp index 1150027edd..bc51ffd0a7 100644 --- a/Gems/Profiler/Code/Source/ProfilerSystemComponent.cpp +++ b/Gems/Profiler/Code/Source/ProfilerSystemComponent.cpp @@ -271,7 +271,6 @@ namespace Profiler // If the thread object already exists (ex. we have already serialized data), join. This will not block since // m_cpuDataSerializationInProgress was false, meaning the IO thread has already completed execution. - // TODO Use a reusable thread implementation over repeated creation + destruction of threads [ATOM-16214] if (m_cpuDataSerializationThread.joinable()) { m_cpuDataSerializationThread.join();