Items nothing calls are gone or sit with the tests
Browse files at this commit0ec584da27808305abc12251d27b4e7a254497acParent: 1361b3c- chore
- items nothing calls are gone or sit with the tests
5 changed files +22 -32
- crates/app/src/layout.rs +6 -3
- crates/app/src/transport.rs +4 -2
- crates/app/src/ui/theme.rs +7 -27
- vendor/rusty_h264-common/src/deblock.rs +3 -0
- vendor/rusty_h264-common/src/inter.rs +2 -0
crates/app/src/layout.rsmodified+6 -3
| @@ -12,7 +12,9 @@ pub(crate) const GHOST_MIN: f32 = 2.; | ||
| 12 | 12 | pub(crate) const HEADER_H: f32 = 32.; |
| 13 | 13 | // 28 button row + 24 scrub strip + two 48 lanes + the timecode line + the gaps |
| 14 | 14 | // between them, with a few px of slack so a taller text line cannot push a lane |
| 15 | -// off the bottom. | |
| 15 | +// off the bottom. The window measures itself from [`timeline_h`] now, so this | |
| 16 | +// figure is the guards' anchor for it and sits with them. | |
| 17 | +#[cfg(test)] | |
| 16 | 18 | pub(crate) const PANEL_H: f32 = 220.; |
| 17 | 19 | /// How many lane rows are drawn before the lane column starts scrolling: past |
| 18 | 20 | /// this the panel would be taller than the picture it belongs under, and a |
| @@ -230,14 +232,15 @@ pub(crate) fn px_below(max_offset_h: f32, offset_y: f32) -> f32 { | ||
| 230 | 232 | /// How tall the panel is with `lanes` tracks in it: [`PANEL_H`] is sized for the |
| 231 | 233 | /// two a project starts with, and every further one adds its own row -- up to |
| 232 | 234 | /// [`LANES_MAX`], past which the lane column scrolls instead and the panel stops |
| 233 | -/// growing. | |
| 235 | +/// growing. Only the guards ask, so it sits with them. | |
| 236 | +#[cfg(test)] | |
| 234 | 237 | pub(crate) fn panel_h(lanes: usize) -> f32 { |
| 235 | 238 | PANEL_H + lanes_h(lanes.clamp(2, LANES_MAX)) - lanes_h(2) |
| 236 | 239 | } |
| 237 | 240 | |
| 238 | 241 | /// How tall the timeline region is: its own padding, the timecode line, the |
| 239 | 242 | /// ruler and the gaps between them, plus a row per lane. Measured from its |
| 240 | -/// parts rather than taken off [`PANEL_H`] -- the button row moved out of it | |
| 243 | +/// parts rather than taken off `PANEL_H` -- the button row moved out of it | |
| 241 | 244 | /// ([`Player::toolbar`]), and a height still carrying that row's pixels is a |
| 242 | 245 | /// height that cuts the last lane off the bottom of the window. |
| 243 | 246 | pub(crate) fn timeline_h(lanes: usize) -> f32 { |
crates/app/src/transport.rsmodified+4 -2
| @@ -81,8 +81,10 @@ impl Volume { | ||
| 81 | 81 | u32::from(self.steps) * 100 / u32::from(Self::MAX_STEPS) |
| 82 | 82 | } |
| 83 | 83 | |
| 84 | - /// What the button reads. The level shows while muted too: it is what the | |
| 85 | - /// next press of the mute key brings back. | |
| 84 | + /// What the button read before the mute state became a glyph and a colour | |
| 85 | + /// ([`Player::toolbar`]): the guards still hold the wording to it, so it | |
| 86 | + /// sits with them rather than in the binary. | |
| 87 | + #[cfg(test)] | |
| 86 | 88 | pub(crate) fn label(self) -> String { |
| 87 | 89 | let percent = u32::from(self.steps) * 100 / u32::from(Self::MAX_STEPS); |
| 88 | 90 | if self.muted { |
crates/app/src/ui/theme.rsmodified+7 -27
| @@ -99,7 +99,6 @@ palette! { | ||
| 99 | 99 | SCRIM: u32, |
| 100 | 100 | SCRIM_LIGHT: u32, |
| 101 | 101 | STROKE_DIVIDER: u32, |
| 102 | - STROKE_FOCUS: u32, | |
| 103 | 102 | STROKE_SELECTED: u32, |
| 104 | 103 | FG_PRIMARY: u32, |
| 105 | 104 | FG_SECONDARY: u32, |
| @@ -229,7 +228,9 @@ impl PaletteId { | ||
| 229 | 228 | } |
| 230 | 229 | |
| 231 | 230 | /// The numbers themselves, for anything that has to measure a family that |
| 232 | - /// is not the one in force -- which is what the contrast guards do. | |
| 231 | + /// is not the one in force -- which is only the contrast guards, so it sits | |
| 232 | + /// with them rather than in the binary. | |
| 233 | + #[cfg(test)] | |
| 233 | 234 | pub fn palette(self) -> &'static Palette { |
| 234 | 235 | &PALETTES[self as usize] |
| 235 | 236 | } |
| @@ -320,9 +321,6 @@ pub mod cool { | ||
| 320 | 321 | |
| 321 | 322 | // -- strokes ---------------------------------------------------------------- |
| 322 | 323 | pub const STROKE_DIVIDER: u32 = 0x2a3442; |
| 323 | - /// The keyboard's own ring, distinct from selection on purpose: focus is | |
| 324 | - /// where the next stroke lands, selection is what an edit acts on. | |
| 325 | - pub const STROKE_FOCUS: u32 = 0xffd166; | |
| 326 | 324 | pub const STROKE_SELECTED: u32 = 0x22d3ee; |
| 327 | 325 | |
| 328 | 326 | // -- text ------------------------------------------------------------------- |
| @@ -395,7 +393,6 @@ pub mod warm { | ||
| 395 | 393 | |
| 396 | 394 | // -- strokes ---------------------------------------------------------------- |
| 397 | 395 | pub const STROKE_DIVIDER: u32 = 0x3a322e; |
| 398 | - pub const STROKE_FOCUS: u32 = 0xffc38a; | |
| 399 | 396 | pub const STROKE_SELECTED: u32 = ACCENT_PRIMARY; |
| 400 | 397 | |
| 401 | 398 | // -- text ------------------------------------------------------------------- |
| @@ -461,7 +458,6 @@ pub mod forest { | ||
| 461 | 458 | |
| 462 | 459 | // -- strokes ---------------------------------------------------------------- |
| 463 | 460 | pub const STROKE_DIVIDER: u32 = 0x25362c; |
| 464 | - pub const STROKE_FOCUS: u32 = 0xffd166; | |
| 465 | 461 | pub const STROKE_SELECTED: u32 = ACCENT_PRIMARY; |
| 466 | 462 | |
| 467 | 463 | // -- text ------------------------------------------------------------------- |
| @@ -526,7 +522,6 @@ pub mod violet { | ||
| 526 | 522 | |
| 527 | 523 | // -- strokes ---------------------------------------------------------------- |
| 528 | 524 | pub const STROKE_DIVIDER: u32 = 0x2e3150; |
| 529 | - pub const STROKE_FOCUS: u32 = 0xfde68a; | |
| 530 | 525 | pub const STROKE_SELECTED: u32 = ACCENT_PRIMARY; |
| 531 | 526 | |
| 532 | 527 | // -- text ------------------------------------------------------------------- |
| @@ -586,7 +581,6 @@ pub mod rose { | ||
| 586 | 581 | |
| 587 | 582 | // -- strokes ---------------------------------------------------------------- |
| 588 | 583 | pub const STROKE_DIVIDER: u32 = 0x332f33; |
| 589 | - pub const STROKE_FOCUS: u32 = 0xfcd34d; | |
| 590 | 584 | pub const STROKE_SELECTED: u32 = ACCENT_PRIMARY; |
| 591 | 585 | |
| 592 | 586 | // -- text ------------------------------------------------------------------- |
| @@ -631,8 +625,7 @@ pub mod rose { | ||
| 631 | 625 | } |
| 632 | 626 | |
| 633 | 627 | /// Family F: a graphite ground -- neutral, a touch warm -- under one gold |
| 634 | -/// accent. The focus ring turns sky here: gold is the accent now, and the | |
| 635 | -/// keyboard's ring is the one thing that may never be mistaken for it. | |
| 628 | +/// accent. | |
| 636 | 629 | pub mod amber { |
| 637 | 630 | // -- surfaces --------------------------------------------------------------- |
| 638 | 631 | pub const BG_CANVAS: u32 = 0x0d0d0c; |
| @@ -649,7 +642,6 @@ pub mod amber { | ||
| 649 | 642 | |
| 650 | 643 | // -- strokes ---------------------------------------------------------------- |
| 651 | 644 | pub const STROKE_DIVIDER: u32 = 0x35352f; |
| 652 | - pub const STROKE_FOCUS: u32 = 0x7dd3fc; | |
| 653 | 645 | pub const STROKE_SELECTED: u32 = ACCENT_PRIMARY; |
| 654 | 646 | |
| 655 | 647 | // -- text ------------------------------------------------------------------- |
| @@ -709,9 +701,6 @@ pub mod ocean { | ||
| 709 | 701 | |
| 710 | 702 | // -- strokes ---------------------------------------------------------------- |
| 711 | 703 | pub const STROKE_DIVIDER: u32 = 0x1e2d42; |
| 712 | - /// Gold, not azure: on a blue ground the accent is the one hue the chrome is | |
| 713 | - /// full of, and a focus ring wearing it says nothing. | |
| 714 | - pub const STROKE_FOCUS: u32 = 0xffd166; | |
| 715 | 704 | pub const STROKE_SELECTED: u32 = ACCENT_PRIMARY; |
| 716 | 705 | |
| 717 | 706 | // -- text ------------------------------------------------------------------- |
| @@ -772,7 +761,6 @@ pub mod ice { | ||
| 772 | 761 | |
| 773 | 762 | // -- strokes ---------------------------------------------------------------- |
| 774 | 763 | pub const STROKE_DIVIDER: u32 = 0x223140; |
| 775 | - pub const STROKE_FOCUS: u32 = 0xfcd34d; | |
| 776 | 764 | pub const STROKE_SELECTED: u32 = ACCENT_PRIMARY; |
| 777 | 765 | |
| 778 | 766 | // -- text ------------------------------------------------------------------- |
| @@ -831,9 +819,6 @@ pub mod orchid { | ||
| 831 | 819 | |
| 832 | 820 | // -- strokes ---------------------------------------------------------------- |
| 833 | 821 | pub const STROKE_DIVIDER: u32 = 0x33203f; |
| 834 | - /// Sky: the ring is neither the orchid the window is full of nor the gold | |
| 835 | - /// the playhead is, so all three are told apart at a glance. | |
| 836 | - pub const STROKE_FOCUS: u32 = 0x7dd3fc; | |
| 837 | 822 | pub const STROKE_SELECTED: u32 = ACCENT_PRIMARY; |
| 838 | 823 | |
| 839 | 824 | // -- text ------------------------------------------------------------------- |
| @@ -901,9 +886,6 @@ pub mod nord { | ||
| 901 | 886 | |
| 902 | 887 | // -- strokes ---------------------------------------------------------------- |
| 903 | 888 | pub const STROKE_DIVIDER: u32 = 0x434c5e; |
| 904 | - /// `nord12`. The Frost blue is the accent here, so the ring is Aurora's | |
| 905 | - /// orange -- and the playhead is the yellow beside it, never this. | |
| 906 | - pub const STROKE_FOCUS: u32 = 0xd08770; | |
| 907 | 889 | pub const STROKE_SELECTED: u32 = ACCENT_PRIMARY; |
| 908 | 890 | |
| 909 | 891 | // -- text ------------------------------------------------------------------- |
| @@ -955,9 +937,9 @@ pub mod nord { | ||
| 955 | 937 | /// and `bg2` are the surfaces verbatim and `fg1`..`fg4` the ink; the clip bodies |
| 956 | 938 | /// are the neutral-mode hues taken down for the same reason Nord's are. |
| 957 | 939 | /// |
| 958 | -/// Three of its colours do three jobs here rather than one: orange is the | |
| 959 | -/// accent, green the playhead, blue the focus ring -- so the family is | |
| 960 | -/// recognisable from the chrome and not only from the ground. | |
| 940 | +/// Two of its colours do two jobs here rather than one: orange is the accent | |
| 941 | +/// and green the playhead -- so the family is recognisable from the chrome and | |
| 942 | +/// not only from the ground. | |
| 961 | 943 | pub mod gruvbox { |
| 962 | 944 | // -- surfaces --------------------------------------------------------------- |
| 963 | 945 | pub const BG_CANVAS: u32 = 0x1d2021; |
| @@ -974,7 +956,6 @@ pub mod gruvbox { | ||
| 974 | 956 | |
| 975 | 957 | // -- strokes ---------------------------------------------------------------- |
| 976 | 958 | pub const STROKE_DIVIDER: u32 = 0x504945; |
| 977 | - pub const STROKE_FOCUS: u32 = 0x83a598; | |
| 978 | 959 | pub const STROKE_SELECTED: u32 = ACCENT_PRIMARY; |
| 979 | 960 | |
| 980 | 961 | // -- text ------------------------------------------------------------------- |
| @@ -1036,7 +1017,6 @@ pub mod dracula { | ||
| 1036 | 1017 | |
| 1037 | 1018 | // -- strokes ---------------------------------------------------------------- |
| 1038 | 1019 | pub const STROKE_DIVIDER: u32 = 0x44475a; |
| 1039 | - pub const STROKE_FOCUS: u32 = 0x8be9fd; | |
| 1040 | 1020 | pub const STROKE_SELECTED: u32 = ACCENT_PRIMARY; |
| 1041 | 1021 | |
| 1042 | 1022 | // -- text ------------------------------------------------------------------- |
vendor/rusty_h264-common/src/deblock.rsmodified+3 -0
| @@ -330,6 +330,9 @@ fn bs1_tile(p: &Blk, q: &Blk) -> bool { | ||
| 330 | 330 | /// Boundary strength from tile entries (spec §8.7.2.1). |
| 331 | 331 | /// Branchless for the same reason as [`BlockInfo::bs_branchless`], but now with |
| 332 | 332 | /// every operand already in a register rather than behind a strided load. |
| 333 | +// --- edith patch: only the `#[cfg(test)]` tile guards below call this, so it | |
| 334 | +// sits with them rather than warning in every build. --- | |
| 335 | +#[cfg(test)] | |
| 333 | 336 | #[inline] |
| 334 | 337 | fn bs_tile(p: &Blk, q: &Blk, mb_edge: bool) -> i32 { |
| 335 | 338 | let intra = !(p.inter & q.inter); |
vendor/rusty_h264-common/src/inter.rsmodified+2 -0
| @@ -510,6 +510,8 @@ fn avg_full(t: &[u8], ts: usize, bw: usize, bh: usize, dr: usize, dc: usize, hal | ||
| 510 | 510 | } |
| 511 | 511 | |
| 512 | 512 | /// A/B: restore half→scratch→avg compose for one-filter qpel (`RS_H264_QPEL_COMPOSE=1`). |
| 513 | +// --- edith patch: both call sites are `#[cfg(accel)]`, so the switch is too. --- | |
| 514 | +#[cfg(accel)] | |
| 513 | 515 | #[inline] |
| 514 | 516 | fn qpel_compose() -> bool { |
| 515 | 517 | use std::sync::OnceLock; |