From 0264a3e7a1494c7dc97ee9a4ecdbd06601be26be Mon Sep 17 00:00:00 2001 From: bosnichd Date: Thu, 26 Aug 2021 13:10:54 -0600 Subject: [PATCH] Various fixes and empty boilerplate files required for restricted platforms. (#3610) * Various fixes and empty boilerplate files required for restricted platforms. Signed-off-by: bosnichd * Add comments to address review feedback. Signed-off-by: bosnichd --- .../AzNetworking/Utilities/EncryptionCommon.cpp | 2 +- Code/Legacy/CryCommon/CMakeLists.txt | 6 ++++++ .../CryCommon/Platform/Android/crycommon_android.cmake | 7 +++++++ .../Platform/Android/crycommon_android_files.cmake | 7 +++++++ .../Legacy/CryCommon/Platform/Linux/crycommon_linux.cmake | 7 +++++++ .../CryCommon/Platform/Linux/crycommon_linux_files.cmake | 7 +++++++ Code/Legacy/CryCommon/Platform/Mac/crycommon_mac.cmake | 7 +++++++ .../CryCommon/Platform/Mac/crycommon_mac_files.cmake | 7 +++++++ .../CryCommon/Platform/Windows/crycommon_windows.cmake | 7 +++++++ .../Platform/Windows/crycommon_windows_files.cmake | 7 +++++++ Code/Legacy/CryCommon/Platform/iOS/crycommon_ios.cmake | 7 +++++++ .../CryCommon/Platform/iOS/crycommon_ios_files.cmake | 7 +++++++ Code/Legacy/CrySystem/CMakeLists.txt | 6 ++++++ .../CrySystem/Platform/Android/platform_android.cmake | 7 +++++++ .../Platform/Android/platform_android_files.cmake | 7 +++++++ Code/Legacy/CrySystem/Platform/Linux/platform_linux.cmake | 7 +++++++ .../CrySystem/Platform/Linux/platform_linux_files.cmake | 7 +++++++ Code/Legacy/CrySystem/Platform/Mac/platform_mac.cmake | 7 +++++++ .../CrySystem/Platform/Mac/platform_mac_files.cmake | 7 +++++++ .../CrySystem/Platform/Windows/platform_windows.cmake | 7 +++++++ .../Platform/Windows/platform_windows_files.cmake | 7 +++++++ Code/Legacy/CrySystem/Platform/iOS/platform_ios.cmake | 7 +++++++ .../CrySystem/Platform/iOS/platform_ios_files.cmake | 7 +++++++ Gems/LyShine/Code/Source/UiFaderComponent.cpp | 4 ++-- Gems/LyShine/Code/Source/UiImageComponent.cpp | 4 ++-- Gems/LyShine/Code/Source/UiImageSequenceComponent.cpp | 4 ++-- Gems/LyShine/Code/Source/UiMaskComponent.cpp | 6 +++--- Gems/LyShine/Code/Source/UiParticleEmitterComponent.cpp | 4 ++-- Gems/LyShine/Code/Source/UiTextComponent.cpp | 8 ++++---- 29 files changed, 168 insertions(+), 16 deletions(-) create mode 100644 Code/Legacy/CryCommon/Platform/Android/crycommon_android.cmake create mode 100644 Code/Legacy/CryCommon/Platform/Android/crycommon_android_files.cmake create mode 100644 Code/Legacy/CryCommon/Platform/Linux/crycommon_linux.cmake create mode 100644 Code/Legacy/CryCommon/Platform/Linux/crycommon_linux_files.cmake create mode 100644 Code/Legacy/CryCommon/Platform/Mac/crycommon_mac.cmake create mode 100644 Code/Legacy/CryCommon/Platform/Mac/crycommon_mac_files.cmake create mode 100644 Code/Legacy/CryCommon/Platform/Windows/crycommon_windows.cmake create mode 100644 Code/Legacy/CryCommon/Platform/Windows/crycommon_windows_files.cmake create mode 100644 Code/Legacy/CryCommon/Platform/iOS/crycommon_ios.cmake create mode 100644 Code/Legacy/CryCommon/Platform/iOS/crycommon_ios_files.cmake create mode 100644 Code/Legacy/CrySystem/Platform/Android/platform_android.cmake create mode 100644 Code/Legacy/CrySystem/Platform/Android/platform_android_files.cmake create mode 100644 Code/Legacy/CrySystem/Platform/Linux/platform_linux.cmake create mode 100644 Code/Legacy/CrySystem/Platform/Linux/platform_linux_files.cmake create mode 100644 Code/Legacy/CrySystem/Platform/Mac/platform_mac.cmake create mode 100644 Code/Legacy/CrySystem/Platform/Mac/platform_mac_files.cmake create mode 100644 Code/Legacy/CrySystem/Platform/Windows/platform_windows.cmake create mode 100644 Code/Legacy/CrySystem/Platform/Windows/platform_windows_files.cmake create mode 100644 Code/Legacy/CrySystem/Platform/iOS/platform_ios.cmake create mode 100644 Code/Legacy/CrySystem/Platform/iOS/platform_ios_files.cmake diff --git a/Code/Framework/AzNetworking/AzNetworking/Utilities/EncryptionCommon.cpp b/Code/Framework/AzNetworking/AzNetworking/Utilities/EncryptionCommon.cpp index 216342a6c5..57badcee4e 100644 --- a/Code/Framework/AzNetworking/AzNetworking/Utilities/EncryptionCommon.cpp +++ b/Code/Framework/AzNetworking/AzNetworking/Utilities/EncryptionCommon.cpp @@ -25,7 +25,7 @@ #if defined(OPENSSL_THREADS) // thread support enabled -#else +#elif AZ_TRAIT_USE_OPENSSL # error OpenSSL threading support is not enabled #endif diff --git a/Code/Legacy/CryCommon/CMakeLists.txt b/Code/Legacy/CryCommon/CMakeLists.txt index ce89757b5c..1556c6a099 100644 --- a/Code/Legacy/CryCommon/CMakeLists.txt +++ b/Code/Legacy/CryCommon/CMakeLists.txt @@ -6,15 +6,21 @@ # # +ly_get_list_relative_pal_filename(pal_dir ${CMAKE_CURRENT_LIST_DIR}/Platform/${PAL_PLATFORM_NAME}) + ly_add_target( NAME CryCommon STATIC NAMESPACE Legacy FILES_CMAKE crycommon_files.cmake + ${pal_dir}/crycommon_${PAL_PLATFORM_NAME_LOWERCASE}_files.cmake # Required for restricted platforms + PLATFORM_INCLUDE_FILES + ${pal_dir}/crycommon_${PAL_PLATFORM_NAME_LOWERCASE}.cmake # Required for restricted platforms INCLUDE_DIRECTORIES PUBLIC . # Lots of code without CryCommon/ .. # Dangerous since exports Legacy's path (client code can do CrySystem/ without depending on that target) + ${pal_dir} # Required for restricted platforms BUILD_DEPENDENCIES PUBLIC AZ::AzCore diff --git a/Code/Legacy/CryCommon/Platform/Android/crycommon_android.cmake b/Code/Legacy/CryCommon/Platform/Android/crycommon_android.cmake new file mode 100644 index 0000000000..7a325ca97e --- /dev/null +++ b/Code/Legacy/CryCommon/Platform/Android/crycommon_android.cmake @@ -0,0 +1,7 @@ +# +# Copyright (c) Contributors to the Open 3D Engine Project. +# For complete copyright and license terms please see the LICENSE at the root of this distribution. +# +# SPDX-License-Identifier: Apache-2.0 OR MIT +# +# diff --git a/Code/Legacy/CryCommon/Platform/Android/crycommon_android_files.cmake b/Code/Legacy/CryCommon/Platform/Android/crycommon_android_files.cmake new file mode 100644 index 0000000000..7a325ca97e --- /dev/null +++ b/Code/Legacy/CryCommon/Platform/Android/crycommon_android_files.cmake @@ -0,0 +1,7 @@ +# +# Copyright (c) Contributors to the Open 3D Engine Project. +# For complete copyright and license terms please see the LICENSE at the root of this distribution. +# +# SPDX-License-Identifier: Apache-2.0 OR MIT +# +# diff --git a/Code/Legacy/CryCommon/Platform/Linux/crycommon_linux.cmake b/Code/Legacy/CryCommon/Platform/Linux/crycommon_linux.cmake new file mode 100644 index 0000000000..7a325ca97e --- /dev/null +++ b/Code/Legacy/CryCommon/Platform/Linux/crycommon_linux.cmake @@ -0,0 +1,7 @@ +# +# Copyright (c) Contributors to the Open 3D Engine Project. +# For complete copyright and license terms please see the LICENSE at the root of this distribution. +# +# SPDX-License-Identifier: Apache-2.0 OR MIT +# +# diff --git a/Code/Legacy/CryCommon/Platform/Linux/crycommon_linux_files.cmake b/Code/Legacy/CryCommon/Platform/Linux/crycommon_linux_files.cmake new file mode 100644 index 0000000000..7a325ca97e --- /dev/null +++ b/Code/Legacy/CryCommon/Platform/Linux/crycommon_linux_files.cmake @@ -0,0 +1,7 @@ +# +# Copyright (c) Contributors to the Open 3D Engine Project. +# For complete copyright and license terms please see the LICENSE at the root of this distribution. +# +# SPDX-License-Identifier: Apache-2.0 OR MIT +# +# diff --git a/Code/Legacy/CryCommon/Platform/Mac/crycommon_mac.cmake b/Code/Legacy/CryCommon/Platform/Mac/crycommon_mac.cmake new file mode 100644 index 0000000000..7a325ca97e --- /dev/null +++ b/Code/Legacy/CryCommon/Platform/Mac/crycommon_mac.cmake @@ -0,0 +1,7 @@ +# +# Copyright (c) Contributors to the Open 3D Engine Project. +# For complete copyright and license terms please see the LICENSE at the root of this distribution. +# +# SPDX-License-Identifier: Apache-2.0 OR MIT +# +# diff --git a/Code/Legacy/CryCommon/Platform/Mac/crycommon_mac_files.cmake b/Code/Legacy/CryCommon/Platform/Mac/crycommon_mac_files.cmake new file mode 100644 index 0000000000..7a325ca97e --- /dev/null +++ b/Code/Legacy/CryCommon/Platform/Mac/crycommon_mac_files.cmake @@ -0,0 +1,7 @@ +# +# Copyright (c) Contributors to the Open 3D Engine Project. +# For complete copyright and license terms please see the LICENSE at the root of this distribution. +# +# SPDX-License-Identifier: Apache-2.0 OR MIT +# +# diff --git a/Code/Legacy/CryCommon/Platform/Windows/crycommon_windows.cmake b/Code/Legacy/CryCommon/Platform/Windows/crycommon_windows.cmake new file mode 100644 index 0000000000..7a325ca97e --- /dev/null +++ b/Code/Legacy/CryCommon/Platform/Windows/crycommon_windows.cmake @@ -0,0 +1,7 @@ +# +# Copyright (c) Contributors to the Open 3D Engine Project. +# For complete copyright and license terms please see the LICENSE at the root of this distribution. +# +# SPDX-License-Identifier: Apache-2.0 OR MIT +# +# diff --git a/Code/Legacy/CryCommon/Platform/Windows/crycommon_windows_files.cmake b/Code/Legacy/CryCommon/Platform/Windows/crycommon_windows_files.cmake new file mode 100644 index 0000000000..7a325ca97e --- /dev/null +++ b/Code/Legacy/CryCommon/Platform/Windows/crycommon_windows_files.cmake @@ -0,0 +1,7 @@ +# +# Copyright (c) Contributors to the Open 3D Engine Project. +# For complete copyright and license terms please see the LICENSE at the root of this distribution. +# +# SPDX-License-Identifier: Apache-2.0 OR MIT +# +# diff --git a/Code/Legacy/CryCommon/Platform/iOS/crycommon_ios.cmake b/Code/Legacy/CryCommon/Platform/iOS/crycommon_ios.cmake new file mode 100644 index 0000000000..7a325ca97e --- /dev/null +++ b/Code/Legacy/CryCommon/Platform/iOS/crycommon_ios.cmake @@ -0,0 +1,7 @@ +# +# Copyright (c) Contributors to the Open 3D Engine Project. +# For complete copyright and license terms please see the LICENSE at the root of this distribution. +# +# SPDX-License-Identifier: Apache-2.0 OR MIT +# +# diff --git a/Code/Legacy/CryCommon/Platform/iOS/crycommon_ios_files.cmake b/Code/Legacy/CryCommon/Platform/iOS/crycommon_ios_files.cmake new file mode 100644 index 0000000000..7a325ca97e --- /dev/null +++ b/Code/Legacy/CryCommon/Platform/iOS/crycommon_ios_files.cmake @@ -0,0 +1,7 @@ +# +# Copyright (c) Contributors to the Open 3D Engine Project. +# For complete copyright and license terms please see the LICENSE at the root of this distribution. +# +# SPDX-License-Identifier: Apache-2.0 OR MIT +# +# diff --git a/Code/Legacy/CrySystem/CMakeLists.txt b/Code/Legacy/CrySystem/CMakeLists.txt index 57e33c4cc0..9e1cf92267 100644 --- a/Code/Legacy/CrySystem/CMakeLists.txt +++ b/Code/Legacy/CrySystem/CMakeLists.txt @@ -6,6 +6,8 @@ # # +ly_get_list_relative_pal_filename(pal_dir ${CMAKE_CURRENT_LIST_DIR}/Platform/${PAL_PLATFORM_NAME}) + add_subdirectory(XML) ly_add_target( @@ -13,9 +15,13 @@ ly_add_target( NAMESPACE Legacy FILES_CMAKE crysystem_files.cmake + ${pal_dir}/platform_${PAL_PLATFORM_NAME_LOWERCASE}_files.cmake # Required for restricted platforms + PLATFORM_INCLUDE_FILES + ${pal_dir}/platform_${PAL_PLATFORM_NAME_LOWERCASE}.cmake # Required for restricted platforms INCLUDE_DIRECTORIES PUBLIC . + ${pal_dir} # Required for restricted platforms BUILD_DEPENDENCIES PRIVATE 3rdParty::expat diff --git a/Code/Legacy/CrySystem/Platform/Android/platform_android.cmake b/Code/Legacy/CrySystem/Platform/Android/platform_android.cmake new file mode 100644 index 0000000000..7a325ca97e --- /dev/null +++ b/Code/Legacy/CrySystem/Platform/Android/platform_android.cmake @@ -0,0 +1,7 @@ +# +# Copyright (c) Contributors to the Open 3D Engine Project. +# For complete copyright and license terms please see the LICENSE at the root of this distribution. +# +# SPDX-License-Identifier: Apache-2.0 OR MIT +# +# diff --git a/Code/Legacy/CrySystem/Platform/Android/platform_android_files.cmake b/Code/Legacy/CrySystem/Platform/Android/platform_android_files.cmake new file mode 100644 index 0000000000..7a325ca97e --- /dev/null +++ b/Code/Legacy/CrySystem/Platform/Android/platform_android_files.cmake @@ -0,0 +1,7 @@ +# +# Copyright (c) Contributors to the Open 3D Engine Project. +# For complete copyright and license terms please see the LICENSE at the root of this distribution. +# +# SPDX-License-Identifier: Apache-2.0 OR MIT +# +# diff --git a/Code/Legacy/CrySystem/Platform/Linux/platform_linux.cmake b/Code/Legacy/CrySystem/Platform/Linux/platform_linux.cmake new file mode 100644 index 0000000000..7a325ca97e --- /dev/null +++ b/Code/Legacy/CrySystem/Platform/Linux/platform_linux.cmake @@ -0,0 +1,7 @@ +# +# Copyright (c) Contributors to the Open 3D Engine Project. +# For complete copyright and license terms please see the LICENSE at the root of this distribution. +# +# SPDX-License-Identifier: Apache-2.0 OR MIT +# +# diff --git a/Code/Legacy/CrySystem/Platform/Linux/platform_linux_files.cmake b/Code/Legacy/CrySystem/Platform/Linux/platform_linux_files.cmake new file mode 100644 index 0000000000..7a325ca97e --- /dev/null +++ b/Code/Legacy/CrySystem/Platform/Linux/platform_linux_files.cmake @@ -0,0 +1,7 @@ +# +# Copyright (c) Contributors to the Open 3D Engine Project. +# For complete copyright and license terms please see the LICENSE at the root of this distribution. +# +# SPDX-License-Identifier: Apache-2.0 OR MIT +# +# diff --git a/Code/Legacy/CrySystem/Platform/Mac/platform_mac.cmake b/Code/Legacy/CrySystem/Platform/Mac/platform_mac.cmake new file mode 100644 index 0000000000..7a325ca97e --- /dev/null +++ b/Code/Legacy/CrySystem/Platform/Mac/platform_mac.cmake @@ -0,0 +1,7 @@ +# +# Copyright (c) Contributors to the Open 3D Engine Project. +# For complete copyright and license terms please see the LICENSE at the root of this distribution. +# +# SPDX-License-Identifier: Apache-2.0 OR MIT +# +# diff --git a/Code/Legacy/CrySystem/Platform/Mac/platform_mac_files.cmake b/Code/Legacy/CrySystem/Platform/Mac/platform_mac_files.cmake new file mode 100644 index 0000000000..7a325ca97e --- /dev/null +++ b/Code/Legacy/CrySystem/Platform/Mac/platform_mac_files.cmake @@ -0,0 +1,7 @@ +# +# Copyright (c) Contributors to the Open 3D Engine Project. +# For complete copyright and license terms please see the LICENSE at the root of this distribution. +# +# SPDX-License-Identifier: Apache-2.0 OR MIT +# +# diff --git a/Code/Legacy/CrySystem/Platform/Windows/platform_windows.cmake b/Code/Legacy/CrySystem/Platform/Windows/platform_windows.cmake new file mode 100644 index 0000000000..7a325ca97e --- /dev/null +++ b/Code/Legacy/CrySystem/Platform/Windows/platform_windows.cmake @@ -0,0 +1,7 @@ +# +# Copyright (c) Contributors to the Open 3D Engine Project. +# For complete copyright and license terms please see the LICENSE at the root of this distribution. +# +# SPDX-License-Identifier: Apache-2.0 OR MIT +# +# diff --git a/Code/Legacy/CrySystem/Platform/Windows/platform_windows_files.cmake b/Code/Legacy/CrySystem/Platform/Windows/platform_windows_files.cmake new file mode 100644 index 0000000000..7a325ca97e --- /dev/null +++ b/Code/Legacy/CrySystem/Platform/Windows/platform_windows_files.cmake @@ -0,0 +1,7 @@ +# +# Copyright (c) Contributors to the Open 3D Engine Project. +# For complete copyright and license terms please see the LICENSE at the root of this distribution. +# +# SPDX-License-Identifier: Apache-2.0 OR MIT +# +# diff --git a/Code/Legacy/CrySystem/Platform/iOS/platform_ios.cmake b/Code/Legacy/CrySystem/Platform/iOS/platform_ios.cmake new file mode 100644 index 0000000000..7a325ca97e --- /dev/null +++ b/Code/Legacy/CrySystem/Platform/iOS/platform_ios.cmake @@ -0,0 +1,7 @@ +# +# Copyright (c) Contributors to the Open 3D Engine Project. +# For complete copyright and license terms please see the LICENSE at the root of this distribution. +# +# SPDX-License-Identifier: Apache-2.0 OR MIT +# +# diff --git a/Code/Legacy/CrySystem/Platform/iOS/platform_ios_files.cmake b/Code/Legacy/CrySystem/Platform/iOS/platform_ios_files.cmake new file mode 100644 index 0000000000..7a325ca97e --- /dev/null +++ b/Code/Legacy/CrySystem/Platform/iOS/platform_ios_files.cmake @@ -0,0 +1,7 @@ +# +# Copyright (c) Contributors to the Open 3D Engine Project. +# For complete copyright and license terms please see the LICENSE at the root of this distribution. +# +# SPDX-License-Identifier: Apache-2.0 OR MIT +# +# diff --git a/Gems/LyShine/Code/Source/UiFaderComponent.cpp b/Gems/LyShine/Code/Source/UiFaderComponent.cpp index e7eca04c59..d9309a7505 100644 --- a/Gems/LyShine/Code/Source/UiFaderComponent.cpp +++ b/Gems/LyShine/Code/Source/UiFaderComponent.cpp @@ -575,7 +575,7 @@ void UiFaderComponent::RenderRttFader(LyShine::IRenderGraph* renderGraph, UiElem AZ::Color clearColor(0.0f, 0.0f, 0.0f, 0.0f); // Start building the render to texture node in the render graph - LyShine::RenderGraph* lyRenderGraph = dynamic_cast(renderGraph); + LyShine::RenderGraph* lyRenderGraph = static_cast(renderGraph); // LYSHINE_ATOM_TODO - find a different solution from downcasting - GHI #3570 lyRenderGraph->BeginRenderToTexture(attachmentImage, m_viewportTopLeft, m_viewportSize, clearColor); // We don't want this fader or parent faders to affect what is rendered to the render target since we will @@ -615,7 +615,7 @@ void UiFaderComponent::RenderRttFader(LyShine::IRenderGraph* renderGraph, UiElem // Add a primitive to render a quad using the render target we have created { - LyShine::RenderGraph* lyRenderGraph = dynamic_cast(renderGraph); + LyShine::RenderGraph* lyRenderGraph = static_cast(renderGraph); // LYSHINE_ATOM_TODO - find a different solution from downcasting - GHI #3570 if (lyRenderGraph) { // Set the texture and other render state required diff --git a/Gems/LyShine/Code/Source/UiImageComponent.cpp b/Gems/LyShine/Code/Source/UiImageComponent.cpp index e01e87aadd..fac8a83c71 100644 --- a/Gems/LyShine/Code/Source/UiImageComponent.cpp +++ b/Gems/LyShine/Code/Source/UiImageComponent.cpp @@ -280,7 +280,7 @@ namespace AZ::Data::Instance image; if (sprite) { - CSprite* cSprite = dynamic_cast(sprite); // LYSHINE_ATOM_TODO - find a different solution from downcasting + CSprite* cSprite = static_cast(sprite); // LYSHINE_ATOM_TODO - find a different solution from downcasting - GHI #3570 if (cSprite) { image = cSprite->GetImage(); @@ -484,7 +484,7 @@ void UiImageComponent::Render(LyShine::IRenderGraph* renderGraph) bool isTextureSRGB = IsSpriteTypeRenderTarget() && m_isRenderTargetSRGB; bool isTexturePremultipliedAlpha = false; // we are not rendering from a render target with alpha in it - LyShine::RenderGraph* lyRenderGraph = dynamic_cast(renderGraph); // LYSHINE_ATOM_TODO - find a different solution from downcasting + LyShine::RenderGraph* lyRenderGraph = static_cast(renderGraph); // LYSHINE_ATOM_TODO - find a different solution from downcasting - GHI #3570 if (lyRenderGraph) { lyRenderGraph->AddPrimitiveAtom(&m_cachedPrimitive, image, isClampTextureMode, isTextureSRGB, isTexturePremultipliedAlpha, m_blendMode); diff --git a/Gems/LyShine/Code/Source/UiImageSequenceComponent.cpp b/Gems/LyShine/Code/Source/UiImageSequenceComponent.cpp index d16242fa05..d954cf2747 100644 --- a/Gems/LyShine/Code/Source/UiImageSequenceComponent.cpp +++ b/Gems/LyShine/Code/Source/UiImageSequenceComponent.cpp @@ -97,7 +97,7 @@ void UiImageSequenceComponent::Render(LyShine::IRenderGraph* renderGraph) return; } - CSprite* sprite = dynamic_cast(m_spriteList[m_sequenceIndex]); + CSprite* sprite = static_cast(m_spriteList[m_sequenceIndex]); // LYSHINE_ATOM_TODO - find a different solution from downcasting - GHI #3570 // get fade value (tracked by UiRenderer) and compute the desired alpha for the image float fade = renderGraph->GetAlphaFade(); @@ -165,7 +165,7 @@ void UiImageSequenceComponent::Render(LyShine::IRenderGraph* renderGraph) LyShine::BlendMode blendMode = LyShine::BlendMode::Normal; // Add the quad to the render graph - LyShine::RenderGraph* lyRenderGraph = dynamic_cast(renderGraph); + LyShine::RenderGraph* lyRenderGraph = static_cast(renderGraph); // LYSHINE_ATOM_TODO - find a different solution from downcasting - GHI #3570 if (lyRenderGraph) { lyRenderGraph->AddPrimitiveAtom(&m_cachedPrimitive, image, diff --git a/Gems/LyShine/Code/Source/UiMaskComponent.cpp b/Gems/LyShine/Code/Source/UiMaskComponent.cpp index d6ed468deb..b6ffc2ae89 100644 --- a/Gems/LyShine/Code/Source/UiMaskComponent.cpp +++ b/Gems/LyShine/Code/Source/UiMaskComponent.cpp @@ -722,7 +722,7 @@ void UiMaskComponent::RenderUsingGradientMask(LyShine::IRenderGraph* renderGraph // mask render target { // Start building the render to texture node in the render graph - LyShine::RenderGraph* lyRenderGraph = dynamic_cast(renderGraph); + LyShine::RenderGraph* lyRenderGraph = static_cast(renderGraph); // LYSHINE_ATOM_TODO - find a different solution from downcasting - GHI #3570 lyRenderGraph->BeginRenderToTexture(maskAttachmentImage, m_viewportTopLeft, m_viewportSize, clearColor); // Render the visual component for this element (if there is one) plus the child mask element (if there is one) @@ -735,7 +735,7 @@ void UiMaskComponent::RenderUsingGradientMask(LyShine::IRenderGraph* renderGraph // content render target { // Start building the render to texture node for the content render target in the render graph - LyShine::RenderGraph* lyRenderGraph = dynamic_cast(renderGraph); + LyShine::RenderGraph* lyRenderGraph = static_cast(renderGraph); // LYSHINE_ATOM_TODO - find a different solution from downcasting - GHI #3570 lyRenderGraph->BeginRenderToTexture(contentAttachmentImage, m_viewportTopLeft, m_viewportSize, clearColor); // Render the "content" - the child elements excluding the child mask element (if any) @@ -772,7 +772,7 @@ void UiMaskComponent::RenderUsingGradientMask(LyShine::IRenderGraph* renderGraph // Add a primitive to do the alpha mask { - LyShine::RenderGraph* lyRenderGraph = dynamic_cast(renderGraph); + LyShine::RenderGraph* lyRenderGraph = static_cast(renderGraph); // LYSHINE_ATOM_TODO - find a different solution from downcasting - GHI #3570 if (lyRenderGraph) { // Set the texture and other render state required diff --git a/Gems/LyShine/Code/Source/UiParticleEmitterComponent.cpp b/Gems/LyShine/Code/Source/UiParticleEmitterComponent.cpp index 0adf2fb2de..c6fd144d3a 100644 --- a/Gems/LyShine/Code/Source/UiParticleEmitterComponent.cpp +++ b/Gems/LyShine/Code/Source/UiParticleEmitterComponent.cpp @@ -785,7 +785,7 @@ void UiParticleEmitterComponent::Render(LyShine::IRenderGraph* renderGraph) AZ::Data::Instance image; if (m_sprite) { - CSprite* sprite = dynamic_cast(m_sprite); + CSprite* sprite = static_cast(m_sprite); // LYSHINE_ATOM_TODO - find a different solution from downcasting - GHI #3570 if (sprite) { image = sprite->GetImage(); @@ -843,7 +843,7 @@ void UiParticleEmitterComponent::Render(LyShine::IRenderGraph* renderGraph) m_cachedPrimitive.m_numVertices = totalVerticesInserted; m_cachedPrimitive.m_numIndices = totalParticlesInserted * indicesPerParticle; - LyShine::RenderGraph* lyRenderGraph = dynamic_cast(renderGraph); + LyShine::RenderGraph* lyRenderGraph = static_cast(renderGraph); // LYSHINE_ATOM_TODO - find a different solution from downcasting - GHI #3570 if (lyRenderGraph) { lyRenderGraph->AddPrimitiveAtom(&m_cachedPrimitive, image, isClampTextureMode, isTextureSRGB, isTexturePremultipliedAlpha, m_blendMode); diff --git a/Gems/LyShine/Code/Source/UiTextComponent.cpp b/Gems/LyShine/Code/Source/UiTextComponent.cpp index 60213878c9..1c8189fa2a 100644 --- a/Gems/LyShine/Code/Source/UiTextComponent.cpp +++ b/Gems/LyShine/Code/Source/UiTextComponent.cpp @@ -1830,7 +1830,7 @@ void UiTextComponent::Render(LyShine::IRenderGraph* renderGraph) DynUiPrimitive* primitive = renderGraph->GetDynamicQuadPrimitive(rect.pt, packedColor); primitive->m_next = nullptr; - LyShine::RenderGraph* lyRenderGraph = dynamic_cast(renderGraph); + LyShine::RenderGraph* lyRenderGraph = static_cast(renderGraph); // LYSHINE_ATOM_TODO - find a different solution from downcasting - GHI #3570 if (lyRenderGraph) { lyRenderGraph->AddPrimitiveAtom(primitive, systemImage, isClampTextureMode, isTextureSRGB, isTexturePremultipliedAlpha, blendMode); @@ -1856,7 +1856,7 @@ void UiTextComponent::Render(LyShine::IRenderGraph* renderGraph) } bool isClampTextureMode = true; - LyShine::RenderGraph* lyRenderGraph = dynamic_cast(renderGraph); + LyShine::RenderGraph* lyRenderGraph = static_cast(renderGraph); // LYSHINE_ATOM_TODO - find a different solution from downcasting - GHI #3570 if (lyRenderGraph) { lyRenderGraph->AddPrimitiveAtom(&batch->m_cachedPrimitive, texture, @@ -1871,7 +1871,7 @@ void UiTextComponent::Render(LyShine::IRenderGraph* renderGraph) for (RenderCacheBatch* batch : m_renderCache.m_batches) { - AZ::FFont* font = static_cast(batch->m_font); // LYSHINE_ATOM_TODO - find a different solution from downcasting FFont to IFont + AZ::FFont* font = static_cast(batch->m_font); // LYSHINE_ATOM_TODO - find a different solution from downcasting - GHI #3570 AZ::Data::Instance fontImage = font->GetFontImage(); if (fontImage) { @@ -1894,7 +1894,7 @@ void UiTextComponent::Render(LyShine::IRenderGraph* renderGraph) // because there is no padding on the left of the glyphs. bool isClampTextureMode = false; - LyShine::RenderGraph* lyRenderGraph = static_cast(renderGraph); // LYSHINE_ATOM_TODO - find a different solution from downcasting + LyShine::RenderGraph* lyRenderGraph = static_cast(renderGraph); // LYSHINE_ATOM_TODO - find a different solution from downcasting - GHI #3570 if (lyRenderGraph) { lyRenderGraph->AddPrimitiveAtom(&batch->m_cachedPrimitive, fontImage,