summaryrefslogtreecommitdiff
path: root/src/gui/gui.zig
diff options
context:
space:
mode:
Diffstat (limited to 'src/gui/gui.zig')
-rw-r--r--src/gui/gui.zig5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/gui/gui.zig b/src/gui/gui.zig
index f62871c4..ff1c7793 100644
--- a/src/gui/gui.zig
+++ b/src/gui/gui.zig
@@ -2669,8 +2669,9 @@ const Client = struct {
const needs = core.needs_frame;
core.frames.mark_start = pardes.FrameStats.nowNs();
core.frames.mark_update = core.frames.mark_start;
- r.draw(.{ .ctx = s, .f = present });
+ // Its render's end is marked as it presents (`present`).
core.frames.mark_render = core.frames.mark_update;
+ r.draw(.{ .ctx = s, .f = present });
cl.link.owed = core.present_skipped;
core.frames.record(pardes.FrameStats.nowNs(), false, cl.link.owed);
core.present_skipped = skipped;
@@ -5194,6 +5195,8 @@ test "background opacity acknowledges success and rolls back unsupported surface
fn present(ctx: ?*anyopaque, surface: *const pardes.Surface) void {
const s = shellOf(ctx);
const core = s.core;
+ // A replica client draws outside the pump, which marks it there.
+ if (s.remote != null) core.frames.mark_render = pardes.FrameStats.nowNs();
s.follow();
const g = s.gui orelse return;
frame_started_ns = monoNs();