Remove unnecessary code

macos_ci_fix
alekulyn 1 year ago
parent 310b8206dd
commit f71862fb76

@ -43,12 +43,10 @@ namespace Terrain
mImmediateCompileSet.erase(node);
mMutex.unlock();
compile(*node, renderInfo, nullptr);
compile(*node, renderInfo);
mMutex.lock();
}
double timeLeft = availableTime;
const auto deadline = std::chrono::steady_clock::now() + std::chrono::duration<double>(availableTime);
while (!mCompileSet.empty() && std::chrono::steady_clock::now() < deadline)
{
@ -56,7 +54,7 @@ namespace Terrain
mCompileSet.erase(node);
mMutex.unlock();
compile(*node, renderInfo, &timeLeft);
compile(*node, renderInfo);
mMutex.lock();
if (node->mCompiled < node->mDrawables.size())
@ -69,7 +67,7 @@ namespace Terrain
mTimer.setStartTick();
}
void CompositeMapRenderer::compile(CompositeMap& compositeMap, osg::RenderInfo& renderInfo, double* timeLeft) const
void CompositeMapRenderer::compile(CompositeMap& compositeMap, osg::RenderInfo& renderInfo) const
{
// if there are no more external references we can assume the texture is no longer required
if (compositeMap.mTexture->referenceCount() <= 1)
@ -125,15 +123,6 @@ namespace Terrain
++compositeMap.mCompiled;
compositeMap.mDrawables[i] = nullptr;
if (timeLeft)
{
*timeLeft -= timer.time_s();
timer.setStartTick();
if (*timeLeft <= 0)
break;
}
}
if (compositeMap.mCompiled == compositeMap.mDrawables.size())
compositeMap.mDrawables = std::vector<osg::ref_ptr<osg::Drawable>>();

@ -38,7 +38,7 @@ namespace Terrain
void drawImplementation(osg::RenderInfo& renderInfo) const override;
void compile(CompositeMap& compositeMap, osg::RenderInfo& renderInfo, double* timeLeft) const;
void compile(CompositeMap& compositeMap, osg::RenderInfo& renderInfo) const;
/// Set the available time in seconds for compiling (non-immediate) composite maps each frame
void setMinimumTimeAvailableForCompile(double time);

Loading…
Cancel
Save