mirror of
https://github.com/overte-org/overte.git
synced 2025-04-05 19:00:28 +02:00
remove unnecessary stage::getNames
This commit is contained in:
parent
6876742e6f
commit
d5158875af
5 changed files with 14 additions and 14 deletions
|
@ -43,7 +43,7 @@ render::ShapePipeline::ItemSetter FadeEffect::getItemUniformSetter() const {
|
|||
if (!render::TransitionStage::isIndexInvalid(item.getTransitionId())) {
|
||||
const auto& scene = args->_scene;
|
||||
const auto& batch = args->_batch;
|
||||
auto transitionStage = scene->getStage<render::TransitionStage>(render::TransitionStage::getName());
|
||||
auto transitionStage = scene->getStage<render::TransitionStage>();
|
||||
auto& transitionState = transitionStage->getTransition(item.getTransitionId());
|
||||
|
||||
if (transitionState.paramsBuffer._size != sizeof(gpu::StructBuffer<FadeObjectParams>)) {
|
||||
|
@ -76,7 +76,7 @@ render::ShapePipeline::ItemSetter FadeEffect::getItemStoredSetter() {
|
|||
return [this](const render::ShapePipeline& shapePipeline, render::Args* args, const render::Item& item) {
|
||||
if (!render::TransitionStage::isIndexInvalid(item.getTransitionId())) {
|
||||
auto scene = args->_scene;
|
||||
auto transitionStage = scene->getStage<render::TransitionStage>(render::TransitionStage::getName());
|
||||
auto transitionStage = scene->getStage<render::TransitionStage>();
|
||||
auto& transitionState = transitionStage->getTransition(item.getTransitionId());
|
||||
const auto fadeCategory = FadeJob::transitionToCategory[transitionState.eventType];
|
||||
|
||||
|
|
|
@ -559,7 +559,7 @@ void FadeJob::configure(const Config& config) {
|
|||
void FadeJob::run(const render::RenderContextPointer& renderContext, FadeJob::Output& output) {
|
||||
Config* jobConfig = static_cast<Config*>(renderContext->jobConfig.get());
|
||||
auto scene = renderContext->args->_scene;
|
||||
auto transitionStage = scene->getStage<render::TransitionStage>(render::TransitionStage::getName());
|
||||
auto transitionStage = scene->getStage<render::TransitionStage>();
|
||||
uint64_t now = usecTimestampNow();
|
||||
const double deltaTime = (int64_t(now) - int64_t(_previousTime)) / double(USECS_PER_SECOND);
|
||||
render::Transaction transaction;
|
||||
|
|
|
@ -156,7 +156,7 @@ void DrawHighlightMask::run(const render::RenderContextPointer& renderContext, c
|
|||
_boundsBuffer = std::make_shared<gpu::Buffer>(sizeof(render::ItemBound));
|
||||
}
|
||||
|
||||
auto highlightStage = renderContext->_scene->getStage<render::HighlightStage>(render::HighlightStage::getName());
|
||||
auto highlightStage = renderContext->_scene->getStage<render::HighlightStage>();
|
||||
auto highlightId = _sharedParameters->_highlightIds[_highlightPassIndex];
|
||||
|
||||
if (!inShapes.empty() && !render::HighlightStage::isIndexInvalid(highlightId)) {
|
||||
|
@ -244,7 +244,7 @@ void DrawHighlight::run(const render::RenderContextPointer& renderContext, const
|
|||
if (sceneDepthBuffer) {
|
||||
auto args = renderContext->args;
|
||||
|
||||
auto highlightStage = renderContext->_scene->getStage<render::HighlightStage>(render::HighlightStage::getName());
|
||||
auto highlightStage = renderContext->_scene->getStage<render::HighlightStage>();
|
||||
auto highlightId = _sharedParameters->_highlightIds[_highlightPassIndex];
|
||||
if (!render::HighlightStage::isIndexInvalid(highlightId)) {
|
||||
auto& highlight = highlightStage->getHighlight(highlightId);
|
||||
|
@ -408,7 +408,7 @@ gpu::PipelinePointer& DebugHighlight::getDepthPipeline() {
|
|||
|
||||
void SelectionToHighlight::run(const render::RenderContextPointer& renderContext, const Inputs& inputs, Outputs& outputs) {
|
||||
auto scene = renderContext->_scene;
|
||||
auto highlightStage = scene->getStage<render::HighlightStage>(render::HighlightStage::getName());
|
||||
auto highlightStage = scene->getStage<render::HighlightStage>();
|
||||
|
||||
auto outlines = inputs.get0();
|
||||
auto framebuffer = inputs.get1();
|
||||
|
@ -570,7 +570,7 @@ void AppendNonMetaOutlines::run(const render::RenderContextPointer& renderContex
|
|||
|
||||
void HighlightCleanup::run(const render::RenderContextPointer& renderContext, const Inputs& inputs) {
|
||||
auto scene = renderContext->_scene;
|
||||
auto highlightStage = scene->getStage<render::HighlightStage>(render::HighlightStage::getName());
|
||||
auto highlightStage = scene->getStage<render::HighlightStage>();
|
||||
|
||||
for (auto index : inputs.get0()) {
|
||||
std::string selectionName = highlightStage->getHighlight(index)._selectionName;
|
||||
|
|
|
@ -153,7 +153,7 @@ void DrawStatus::run(const RenderContextPointer& renderContext, const Input& inp
|
|||
// We have a transition. Show this icon.
|
||||
status.setScale(1.0f);
|
||||
// Is this a valid transition ID according to FadeJob?
|
||||
auto transitionStage = scene->getStage<TransitionStage>(TransitionStage::getName());
|
||||
auto transitionStage = scene->getStage<TransitionStage>();
|
||||
if (transitionStage) {
|
||||
if (transitionStage->isTransitionUsed(transitionID)) {
|
||||
// Valid, active transition
|
||||
|
|
|
@ -382,7 +382,7 @@ void Scene::updateItems(const Transaction::Updates& transactions) {
|
|||
}
|
||||
|
||||
void Scene::resetTransitionItems(const Transaction::TransitionResets& transactions) {
|
||||
auto transitionStage = getStage<TransitionStage>(TransitionStage::getName());
|
||||
auto transitionStage = getStage<TransitionStage>();
|
||||
|
||||
if (!transitionStage) {
|
||||
return;
|
||||
|
@ -425,7 +425,7 @@ void Scene::removeTransitionItems(const Transaction::TransitionRemoves& transact
|
|||
}
|
||||
|
||||
void Scene::queryTransitionItems(const Transaction::TransitionQueries& transactions) {
|
||||
auto transitionStage = getStage<TransitionStage>(TransitionStage::getName());
|
||||
auto transitionStage = getStage<TransitionStage>();
|
||||
|
||||
if (!transitionStage) {
|
||||
return;
|
||||
|
@ -467,7 +467,7 @@ void Scene::resetTransitionFinishedOperator(const Transaction::TransitionFinishe
|
|||
}
|
||||
|
||||
void Scene::resetHighlights(const Transaction::HighlightResets& transactions) {
|
||||
auto outlineStage = getStage<HighlightStage>(HighlightStage::getName());
|
||||
auto outlineStage = getStage<HighlightStage>();
|
||||
if (outlineStage) {
|
||||
for (auto& transaction : transactions) {
|
||||
const auto& selectionName = std::get<0>(transaction);
|
||||
|
@ -484,7 +484,7 @@ void Scene::resetHighlights(const Transaction::HighlightResets& transactions) {
|
|||
}
|
||||
|
||||
void Scene::removeHighlights(const Transaction::HighlightRemoves& transactions) {
|
||||
auto outlineStage = getStage<HighlightStage>(HighlightStage::getName());
|
||||
auto outlineStage = getStage<HighlightStage>();
|
||||
if (outlineStage) {
|
||||
for (auto& selectionName : transactions) {
|
||||
auto outlineId = outlineStage->getHighlightIdBySelection(selectionName);
|
||||
|
@ -497,7 +497,7 @@ void Scene::removeHighlights(const Transaction::HighlightRemoves& transactions)
|
|||
}
|
||||
|
||||
void Scene::queryHighlights(const Transaction::HighlightQueries& transactions) {
|
||||
auto outlineStage = getStage<HighlightStage>(HighlightStage::getName());
|
||||
auto outlineStage = getStage<HighlightStage>();
|
||||
if (outlineStage) {
|
||||
for (auto& transaction : transactions) {
|
||||
const auto& selectionName = std::get<0>(transaction);
|
||||
|
@ -551,7 +551,7 @@ void Scene::setItemTransition(ItemID itemId, Index transitionId) {
|
|||
}
|
||||
|
||||
void Scene::removeItemTransition(ItemID itemId) {
|
||||
auto transitionStage = getStage<TransitionStage>(TransitionStage::getName());
|
||||
auto transitionStage = getStage<TransitionStage>();
|
||||
if (!transitionStage) {
|
||||
return;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue