Never make the client wait for drawing, or hold up its steps
CI / build (push) Successful in 1m15s

The renderer process now takes each view's chunks on a thread of its own as
they come, and draws the newest frame on its main thread: the client no longer
waits for the previous frame to be drawn (on a VM, 22 of a frame's 25 ms).

The adapter records the client's steps (SceneViewer::step, by replacing its
entry in the exported IFrameListener vtable, after checking it), and the frame
pacer doesn't ask for a frame that wouldn't end before the next step is due: a
late step made the client catch up two at once, which showed as hitches. While
the renderer process covers the view, the client's renderer doesn't begin or
present frames, which could wait for the display.

The engine's stats now include the time in the client renderer's methods.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
This commit is contained in:
dhkatzandClaude Opus 5.5 committed 2026-10-28 21:30:46 -07:00
1 parent 399d934a08
commit 065c7e9300
11 files changed
+280 -78

No files matched your search

+4 -3
View File
@@ -6,6 +6,7 @@
#include <new>
#include <unordered_set>
#include "inner_timing.hpp"
#include "log.hpp"
namespace t5de {
@@ -73,7 +74,7 @@ imvu::Vec2i Texture::size() const { return inner_ != nullptr ? inner_->size() :
void Texture::updateRegions(const imvu::Pixmap& pixmap, const imvu::CompoundRegion& regions)
{
if (inner_ != nullptr) {
inner_->updateRegions(pixmap, regions);
{ const InnerCall timed; inner_->updateRegions(pixmap, regions); }
recorder_->updateTexture(id_, pixmap); // all of it: the regions' layout isn't known
}
}
@@ -81,7 +82,7 @@ void Texture::updateRegions(const imvu::Pixmap& pixmap, const imvu::CompoundRegi
void Texture::update(const imvu::Pixmap& pixmap)
{
if (inner_ != nullptr) {
inner_->update(pixmap);
{ const InnerCall timed; inner_->update(pixmap); }
recorder_->updateTexture(id_, pixmap);
}
}
@@ -124,7 +125,7 @@ VertexBuffer::~VertexBuffer()
void VertexBuffer::update(const void* data, std::uint32_t stride, std::uint32_t elementSize, std::uint32_t elementCount)
{
inner_->update(data, stride, elementSize, elementCount);
{ const InnerCall timed; inner_->update(data, stride, elementSize, elementCount); }
recorder_->updateBuffer(id_, data, stride, elementSize, elementCount);
}