Video mirror: frametime + FPS graphs with min/max/avg stats
The mirror renders into the host window, so the host's render frame timing is the mirror's performance. FrameStats now retains a ~2 s ring of frame-time samples; the Video mirror panel plots them as a frametime graph (0-33 ms scale) and an FPS graph (0-144 scale), each with an avg overlay, and prints avg/min/max for both frametime and FPS underneath. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
@@ -9,6 +9,7 @@
|
||||
|
||||
#include "capture/frame_renderer.hpp"
|
||||
#include "capture/window_capture.hpp"
|
||||
#include "ui/app_chrome.hpp"
|
||||
|
||||
namespace coop
|
||||
{
|
||||
@@ -24,12 +25,16 @@ public:
|
||||
target_ = target;
|
||||
}
|
||||
|
||||
void draw_ui();
|
||||
// `stats` are the host's render frame-timing, drawn as the mirror's
|
||||
// frametime / FPS graphs (this window is what the mirror renders into).
|
||||
void draw_ui(const FrameStats& stats);
|
||||
|
||||
// Render thread: draw the mirrored frame as the window background.
|
||||
void render(ID3D11DeviceContext* ctx, std::uint32_t dst_w, std::uint32_t dst_h);
|
||||
|
||||
private:
|
||||
void draw_perf_graphs(const FrameStats& stats);
|
||||
|
||||
ID3D11Device* device_ = nullptr;
|
||||
FrameRenderer renderer_;
|
||||
WindowCapture capture_;
|
||||
|
||||
Reference in New Issue
Block a user