Merge pull request #526 from aws-lumberyard-dev/Atom/olexl/ATOM-15349

Deleted AzFramework::AtomActiveInterface
This commit is contained in:
Olex Lozitskiy
2021-05-04 13:44:04 -04:00
committed by GitHub
30 changed files with 25 additions and 424 deletions
@@ -30,7 +30,6 @@
#include <AzFramework/Entity/EntityContextBus.h>
#include <AzFramework/Physics/Material.h>
#include <AzFramework/StringFunc/StringFunc.h>
#include <AzFramework/API/AtomActiveInterface.h>
#include <AzToolsFramework/API/EditorAssetSystemAPI.h>
#include <AzToolsFramework/API/EntityCompositionRequestBus.h>
#include <AzToolsFramework/API/ToolsApplicationAPI.h>
@@ -162,13 +161,6 @@ void SandboxIntegrationManager::Setup()
AzToolsFramework::EditorEvents::Bus::Handler::BusConnect();
AzToolsFramework::EditorEntityContextNotificationBus::Handler::BusConnect();
AzToolsFramework::SliceEditorEntityOwnershipServiceNotificationBus::Handler::BusConnect();
// turn on the this debug display request bus implementation if no other implementation is active
if( !(AZ::Interface<AzFramework::AtomActiveInterface>::Get() && AzFramework::DebugDisplayRequestBus::HasHandlers()))
{
m_debugDisplayBusImplementationActive = true;
AzFramework::DebugDisplayRequestBus::Handler::BusConnect(
AzToolsFramework::ViewportInteraction::g_mainViewportEntityDebugDisplayId);
}
AzFramework::DisplayContextRequestBus::Handler::BusConnect();
SetupFileExtensionMap();
@@ -37,8 +37,6 @@
#include <AzCore/Jobs/JobManager.h>
#include <AzCore/Interface/Interface.h>
#include <AzFramework/API/AtomActiveInterface.h>
#include <AzQtComponents/Utilities/QtWindowUtilities.h>
// Class to implement the WindowRequestBus::Handler instead of the QViewport class.
@@ -365,7 +363,7 @@ bool QViewport::CreateRenderContext()
HWND windowHandle = reinterpret_cast<HWND>(QWidget::winId());
if( AZ::Interface<AzFramework::AtomActiveInterface>::Get() && m_renderContextCreated && windowHandle == m_lastHwnd)
if( m_renderContextCreated && windowHandle == m_lastHwnd)
{
// the hwnd has not changed, no need to destroy and recreate context (and swap chain etc)
return false;
@@ -377,13 +375,10 @@ bool QViewport::CreateRenderContext()
{
m_renderContextCreated = true;
if (AZ::Interface<AzFramework::AtomActiveInterface>::Get())
{
m_viewportRequests.get()->BusConnect(windowHandle);
AzFramework::WindowSystemNotificationBus::Broadcast(&AzFramework::WindowSystemNotificationBus::Handler::OnWindowCreated, windowHandle);
m_viewportRequests.get()->BusConnect(windowHandle);
AzFramework::WindowSystemNotificationBus::Broadcast(&AzFramework::WindowSystemNotificationBus::Handler::OnWindowCreated, windowHandle);
m_lastHwnd = windowHandle;
}
m_lastHwnd = windowHandle;
StorePreviousContext();
GetIEditor()->GetEnv()->pRenderer->CreateContext(windowHandle);