LyShine cleanup of TODOs (#6138)

* LyShine cleanup pass for Atom conversion

Signed-off-by: abrmich <abrmich@amazon.com>

* Add GHI numbers to comments

Signed-off-by: abrmich <abrmich@amazon.com>
This commit is contained in:
michabr
2021-12-13 15:00:26 -08:00
committed by GitHub
parent 04669544cc
commit d951e1f652
21 changed files with 105 additions and 133 deletions
@@ -97,7 +97,7 @@ void UiImageSequenceComponent::Render(LyShine::IRenderGraph* renderGraph)
return;
}
CSprite* sprite = static_cast<CSprite*>(m_spriteList[m_sequenceIndex]); // LYSHINE_ATOM_TODO - find a different solution from downcasting - GHI #3570
ISprite* sprite = m_spriteList[m_sequenceIndex];
// get fade value (tracked by UiRenderer) and compute the desired alpha for the image
float fade = renderGraph->GetAlphaFade();
@@ -165,12 +165,8 @@ void UiImageSequenceComponent::Render(LyShine::IRenderGraph* renderGraph)
LyShine::BlendMode blendMode = LyShine::BlendMode::Normal;
// Add the quad to the render graph
LyShine::RenderGraph* lyRenderGraph = static_cast<LyShine::RenderGraph*>(renderGraph); // LYSHINE_ATOM_TODO - find a different solution from downcasting - GHI #3570
if (lyRenderGraph)
{
lyRenderGraph->AddPrimitiveAtom(&m_cachedPrimitive, image,
isClampTextureMode, isTextureSRGB, isTexturePremultipliedAlpha, blendMode);
}
renderGraph->AddPrimitive(&m_cachedPrimitive, image,
isClampTextureMode, isTextureSRGB, isTexturePremultipliedAlpha, blendMode);
}
}