The pacer counted only its own frames, so the client's 30 came on top (60 gave about 80), and it added no frames at all when the rate was out of reach. It now asks for a window's next frame once the interval since its last frame began has passed, and the client has had a third of a frame's time idle: all frames within the rate, and as many as the client can draw when it can't reach it. The engine's stats also break a frame's time down: sending to the renderer process, bytes sent, buffer updates. Co-Authored-By: Claude Opus 5.5 <[email protected]>
This commit is contained in:
1 parent
05a7be5d41
commit
399d934a08
6 files changed
+45
-18
No files matched your search
@@ -6,6 +6,7 @@
|
||||
#include <cstdint>
|
||||
#include <memory>
|
||||
#include <span>
|
||||
#include <utility>
|
||||
|
||||
#include "renderer_process.hpp"
|
||||
#include "t5de/imvu/types.hpp"
|
||||
@@ -52,12 +53,23 @@ public:
|
||||
std::uint32_t count);
|
||||
void destroyBuffer(std::uint32_t id);
|
||||
|
||||
// Diagnostics: what's been sent, and the time spent sending (waiting for the renderer process to take it).
|
||||
struct Counters {
|
||||
std::uint64_t bytes = 0;
|
||||
double sendSeconds = 0;
|
||||
std::uint32_t bufferUpdates = 0;
|
||||
std::uint64_t bufferBytes = 0;
|
||||
};
|
||||
// Returns the counters since the last call.
|
||||
Counters takeCounters() { return std::exchange(counters_, {}); }
|
||||
|
||||
private:
|
||||
void addPixels(protocol::Op op, std::uint32_t id, const imvu::Pixmap& pixmap, std::uint32_t flags);
|
||||
|
||||
std::unique_ptr<RendererProcess> process_;
|
||||
protocol::Writer writer_;
|
||||
std::uint32_t nextId_ = 1;
|
||||
Counters counters_;
|
||||
};
|
||||
|
||||
// Copies count elements of elementSize bytes, stride bytes apart (0: packed), into destination, packed.
|
||||
|
||||
Reference in new issue
Block a user