MCPcopy Create free account
hub / github.com/MrNeRF/LichtFeld-Studio / waitForNextEvent

Method waitForNextEvent

src/visualizer/visualizer_impl.cpp:1253–1269  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1251 }
1252
1253 void VisualizerImpl::waitForNextEvent(const bool is_training) {
1254 if (!window_manager_)
1255 return;
1256
1257 auto wait_seconds = is_training ? 0.1 : 0.5;
1258 if (rendering_manager_ && rendering_manager_->hasPendingViewportResizeSettle()) {
1259 const double settle_wait = rendering_manager_->secondsUntilViewportResizeSettleReady();
1260 wait_seconds = std::min(wait_seconds,
1261 std::max(kResizeSettleMinWaitSeconds, settle_wait));
1262 }
1263
1264 if (is_training) {
1265 window_manager_->waitEvents(wait_seconds); // Training tick is capped at ~10 Hz when no resize settle is due.
1266 } else {
1267 window_manager_->waitEvents(wait_seconds);
1268 }
1269 }
1270
1271 void VisualizerImpl::render() {
1272

Callers

nothing calls this directly

Calls 3

waitEventsMethod · 0.80
minFunction · 0.50
maxFunction · 0.50

Tested by

no test coverage detected