Close three critical review findings on the render-bounds-channel verdict

Verdict can no longer print a false EXACT on an on-grid end, no longer names a
bounds channel a content-derived render never consulted, and the grid-align doc
premise is corrected without implementing it.
This commit is contained in:
2026-08-02 15:56:57 -04:00
parent a0fd931dcb
commit 5f971e60cd
14 changed files with 750 additions and 81 deletions
+36 -3
View File
@@ -14,7 +14,36 @@ double autoTrimEndRatio() {
return std::pow(10.0, kAutoTrimThresholdDb / 20.0);
}
TailRenderSettings tailRenderSettingsFor(TailMode mode, double manualTailMs) {
int renderBoundsFlagFor(RenderBoundsChannel channel) {
switch (channel) {
case RenderBoundsChannel::CustomTimeBounds: return 0;
case RenderBoundsChannel::TimeSelection: return 2;
}
// Unreachable for a valid enum; fail closed to the channel every shipped capture
// rendered on, never to a mode that bounds itself off something else entirely.
return 0;
}
int tailFlagBitFor(RenderBoundsChannel channel) {
switch (channel) {
case RenderBoundsChannel::CustomTimeBounds: return kTailFlagCustomBounds;
case RenderBoundsChannel::TimeSelection: return kTailFlagTimeSelection;
}
return kTailFlagCustomBounds; // paired with renderBoundsFlagFor's fallback
}
const char* renderBoundsChannelLabel(RenderBoundsChannel channel) {
switch (channel) {
case RenderBoundsChannel::CustomTimeBounds:
return "custom time bounds (RENDER_BOUNDSFLAG=0, RENDER_STARTPOS/RENDER_ENDPOS)";
case RenderBoundsChannel::TimeSelection:
return "time selection (RENDER_BOUNDSFLAG=2, GetSet_LoopTimeRange)";
}
return "unnamed bounds channel";
}
TailRenderSettings tailRenderSettingsFor(TailMode mode, double manualTailMs,
RenderBoundsChannel channel) {
TailRenderSettings t;
switch (mode) {
case TailMode::None:
@@ -30,7 +59,7 @@ TailRenderSettings tailRenderSettingsFor(TailMode mode, double manualTailMs) {
// postprocessing bit clear. A fixed-threshold trim scales/limits/fades
// nothing, so identical requests trim at the identical sample -> holds
// the bit-identical-repeats invariant.
t.tailFlag = kTailFlagCustomBounds;
t.tailFlag = tailFlagBitFor(channel);
t.tailMs = kMaxTailMs;
t.normalize = kNormalizeTrimEnd;
t.trimEnd = autoTrimEndRatio();
@@ -38,7 +67,7 @@ TailRenderSettings tailRenderSettingsFor(TailMode mode, double manualTailMs) {
case TailMode::Manual:
// Clamped to the cap regardless of source; negative floors to 0.
t.tailFlag = kTailFlagCustomBounds;
t.tailFlag = tailFlagBitFor(channel);
t.tailMs = std::clamp(manualTailMs, 0.0, kMaxTailMs);
t.normalize = kNormalizeDisableAll;
t.trimEnd = 0.0;
@@ -114,6 +143,10 @@ const char* renderSourceLabel(SourceMode mode) {
return "unknown"; // unreachable for a valid enum; never claim a source
}
bool sourceBypassesBoundsChannel(SourceMode mode) {
return mode == SourceMode::SelectedItems || mode == SourceMode::RazorArea;
}
SourceMode sourceModeForScope(CaptureScope scope, bool itemExtentIsWindow) {
switch (scope) {
case CaptureScope::Item: