Skip to content

cef_host: say why the resize capture refresh is needed, accurately - #62

Merged
wenkaifan0720 merged 1 commit into
mainfrom
fix/capture-refresh-wording
Sep 29, 2026
Merged

wenkaifan0720 merged 1 commit into
mainfrom
fix/capture-refresh-wording

Conversation

@wenkaifan0720

Copy link
Copy Markdown
Collaborator

Comment and changelog only. It corrects the explanation #61 gave for the capture refresh, before the prebuilt is published; comments count toward the cef_host input hash.

A trace of the stall with gpu.capture on (refresh disabled so it reproduces) shows the same sequence in all three stalls:

  1. The renderer's first frame at the new size activates, and the capturer captures it at the old size.
  2. CEF's OnRenderFrameMetadataChangedAfterActivation then sets the new capture size. The capture that asks for is rate-limited (FpsRateLimited demand), because a capture was just taken.
  3. The capturer retries every ~33 ms as a kRefreshRequest. Every retry is rejected for the whole stall, and the smoothing sampler's token bucket is never consulted. That puts the rejection in VideoCaptureOracle's non-compositor check: nothing pending, no recent animation.
  4. At the kick, Invalidate sends a refresh demand, which the oracle treats like a compositor update, and it captures at once.

The fix in #61 is unchanged. #61 said the capturer drops refresh requests while it sees the content as animating; that rule applies only to the capturer's own retries, not to Invalidate's demand.

🤖 Generated with Claude Code

The #61 comment said the capturer drops refresh requests while it sees
the content as animating. A trace with gpu.capture on shows the actual
sequence: the renderer's first new-size frame is captured at the old
size, CEF then sets the new capture size, the capture that asks for is
rate-limited, and the capturer's own retries (every ~33 ms) are all
turned away by the stricter check for non-compositor refreshes (nothing
pending, no recent animation) until the stall kick. Invalidate's refresh
demand is treated like a compositor update and captures at once.
Comment and changelog only.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
@wenkaifan0720
wenkaifan0720 merged commit 0ba809d into main Sep 29, 2026
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant