Repository navigation
长截图:修复第一帧截到遮罩、终端背景图下接不上 - #22
Merged
Merged
Conversation
按 L 后只等 50 ms 就截长图的第一帧,截屏遮罩还在淡出:第一帧是遮罩里的冻结画面, 每个像素颜色差一点,之后每一帧都和它对不上。改为等连续两帧完全相同再用,最多 0.6 秒。 用户复现的帧离线重放:原来除第一帧外全部没接上,修正后 0 帧没接上。 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
终端带不随文字滚动的背景图,滚过之后没有一行完全相同,精确比对一帧都接不上。 精确比对找不到时只和上次接上的那帧近似比对(Stitch::follow),比横向边缘而不是颜色, 平滑的背景图几乎不影响;最好的位置要不到次好的一半,次好的又不能好过毫不相干的位置的一半, 一行行很像的内容错开整行时报没接上,不接错。用户的两组终端帧与 Chrome 帧重放均 0 帧没接上。 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Merged
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
问题
真机反馈:长截图滚得很慢也一直提示“滚得太快没接上”,完成不了;修好第一个问题后,在终端里仍然接不上。
原因与改动
1. 第一帧截到了淡出中的截图遮罩(Chrome 等所有应用)
按 L 后只等 50 ms 就截第一帧,遮罩撤下与窗口服务器的淡出是异步的,截到的是遮罩里的冻结画面:内容一样、每个像素颜色差一点,之后每帧都对不上。
longshot::settled:等连续两帧完全相同再用,最多 0.6 秒。单元测试first_frame_waits_until_the_overlay_is_gone。2. 终端的背景图不随文字滚动
滚过之后没有一行完全相同,精确比对按设计一帧都接不上。
Stitch::follow:精确比对找不到时,只和上次接上的那帧近似比对。比横向边缘(文字锐利、背景图平滑),不比颜色。repetitive_lines_never_misjoin当场接错,已补上。text_over_a_fixed_background;fractional_or_noisy_frames_*改为“按最近的整行接上”(小数像素、噪点帧现在接得上)。规格说明 v0.1.40、v0.1.41(M23 规则 13),设计文档、已知限制、设备支持、验收记录同步。
验证
开发构建临时逐帧存图(没有提交),用户复现后离线重放:
近似比对的区分度:对的位置与次好位置的比值 0.07–0.23,没有重叠的两帧 0.98–1.00;每帧最慢 15 ms。
make check通过。🤖 Generated with Claude Code