re: rest() fixed -- a trailing keyframe run is the hold when it is
VISIBLE, not when its pose repeats The port agent's report was right about the defect and about which elements it hits, and its proposed condition does not survive the case the exclusion was written for. Their test -- the final untimed keyframe has the same pose as the last timed one -- is also true of pgptitle.rat, whose trailing run is two identical transparent frames. Adopting it would erase the word PAUSE again, which a committed capture disproves. What separates the two is alpha: an exit fades the element out so its last keyframe is transparent, while an element with no exit ends on the pose you can see. So rest_plateau now accepts a trailing run exactly when it is visible. Verified against a capture rather than against another renderer, which is the point their own report made: ptframe1's rest moves from (620,108) t=16 to (440,108) t=62; the changed pixels are 10082 in a bounding box of x 440-839, y 108-577, which is exactly the 400x470 at (440,108) they predicted; and correlation against main-menu-oracle.png over that region improves from 0.9596 to 0.9748. The PAUSE wordmark is unchanged across all three pause builds. This also closes a question ui-paint-order-key.md has carried for a while, that ptframe1 and ptframe2 rest at alpha 0 while the capture shows the menu frame plainly. One trap cost most of this iteration and goes in METHOD: CARGO_TARGET_DIR is redirected in this container, so ./target/debug/sylpheed-cli is hours stale and every render I made against it was old code. Byte-identical before and after reads as "no effect" when it actually means "you ran the old binary". The full disc-gated test suite was still executing when this was committed; the verification above is artifact-based.
This commit is contained in:
@@ -227,7 +227,24 @@ impl Element {
|
||||
any = Some(i);
|
||||
any_len = len;
|
||||
}
|
||||
if j != n - 1 && len >= best_len {
|
||||
// A trailing run is normally the EXIT and is excluded (see the
|
||||
// doc comment) — but not always, and the tell is its ALPHA.
|
||||
//
|
||||
// An exit fades the element out, so its final keyframe is
|
||||
// transparent: `pgptitle.rat`'s trailing run is `0x00ffffff`, and
|
||||
// taking it erases the word PAUSE. An element with **no exit**
|
||||
// ends on its hold, which is whatever it looks like on screen —
|
||||
// opaque: `ptframe1`/`ptframe2` on the title main menu end on a
|
||||
// run of three at `0xffffffff`, and excluding it dropped the
|
||||
// bright circuit bracket the capture plainly shows.
|
||||
//
|
||||
// So a trailing run is the hold exactly when it is **visible**.
|
||||
// (The port agent's report proposed "the final untimed keyframe
|
||||
// has the same pose as the last timed one"; that is true of
|
||||
// `pgptitle` too and would erase PAUSE, so it is the alpha and
|
||||
// not the pose-equality that separates the two.)
|
||||
let trailing_is_the_hold = j == n - 1 && (self.keyframes[i].fade >> 24) != 0;
|
||||
if (j != n - 1 || trailing_is_the_hold) && len >= best_len {
|
||||
best = Some(i);
|
||||
best_len = len;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user