MCPcopy Create free account
hub / github.com/GameTechDev/PresentMon / RunTick

Method RunTick

IntelPresentMon/Core/source/kernel/Overlay.cpp:391–423  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

389 }
390
391 void Overlay::RunTick()
392 {
393 const auto wait = scheduler_.GetNextWait();
394 samplingWaiter.SetInterval(wait);
395 samplingWaiter.Wait();
396 pmon::Timekeeper::LockNow();
397
398 if (scheduler_.AtPoll() && !IsHidden_()) {
399 pmlog_mark mkPoll;
400 UpdateGraphData_(pmon::Timekeeper::GetLockedNow());
401 pmlog_perf(clog::p::overlay)("Data update time").mark(mkPoll);
402 }
403 if (scheduler_.AtRender()) {
404 // handle hide during move logic (show if time elapsed and now otherwise hidden)
405 if (lastMoveTime) {
406 const auto now = std::chrono::high_resolution_clock::now();
407 if (std::chrono::duration<float>(now - *lastMoveTime).count() >= 0.1f) {
408 lastMoveTime = {};
409 if (pWindow && !IsHidden_()) {
410 pWindow->Show();
411 }
412 }
413 }
414 if (!IsHidden_()) {
415 pmlog_mark mkRender;
416 Render_();
417 pmlog_perf(clog::p::overlay)("Overlay draw time").mark(mkRender);
418 }
419 }
420 if (scheduler_.AtTrace() && pWriter) {
421 pWriter->Process();
422 }
423 }
424
425 void Overlay::SetCaptureState(bool active)
426 {

Callers 1

RunOverlayLoop_Method · 0.45

Calls 8

GetNextWaitMethod · 0.80
SetIntervalMethod · 0.80
AtPollMethod · 0.80
AtRenderMethod · 0.80
ShowMethod · 0.80
AtTraceMethod · 0.80
WaitMethod · 0.45
ProcessMethod · 0.45

Tested by

no test coverage detected