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 | pub(crate) const HEADER_H: f32 = 32.; | 12 | pub(crate) const HEADER_H: f32 = 32.; |
| 13 | // 28 button row + 24 scrub strip + two 48 lanes + the timecode line + the gaps | 13 | // 28 button row + 24 scrub strip + two 48 lanes + the timecode line + the gaps |
| 14 | // between them, with a few px of slack so a taller text line cannot push a lane | 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 | pub(crate) const PANEL_H: f32 = 220.; | 18 | pub(crate) const PANEL_H: f32 = 220.; |
| 17 | /// How many lane rows are drawn before the lane column starts scrolling: past | 19 | /// How many lane rows are drawn before the lane column starts scrolling: past |
| 18 | /// this the panel would be taller than the picture it belongs under, and a | 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 | /// How tall the panel is with `lanes` tracks in it: [`PANEL_H`] is sized for the | 232 | /// How tall the panel is with `lanes` tracks in it: [`PANEL_H`] is sized for the |
| 231 | /// two a project starts with, and every further one adds its own row -- up to | 233 | /// two a project starts with, and every further one adds its own row -- up to |
| 232 | /// [`LANES_MAX`], past which the lane column scrolls instead and the panel stops | 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 | pub(crate) fn panel_h(lanes: usize) -> f32 { | 237 | pub(crate) fn panel_h(lanes: usize) -> f32 { |
| 235 | PANEL_H + lanes_h(lanes.clamp(2, LANES_MAX)) - lanes_h(2) | 238 | PANEL_H + lanes_h(lanes.clamp(2, LANES_MAX)) - lanes_h(2) |
| 236 | } | 239 | } |
| 237 | 240 | ||
| 238 | /// How tall the timeline region is: its own padding, the timecode line, the | 241 | /// How tall the timeline region is: its own padding, the timecode line, the |
| 239 | /// ruler and the gaps between them, plus a row per lane. Measured from its | 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 | /// ([`Player::toolbar`]), and a height still carrying that row's pixels is a | 244 | /// ([`Player::toolbar`]), and a height still carrying that row's pixels is a |
| 242 | /// height that cuts the last lane off the bottom of the window. | 245 | /// height that cuts the last lane off the bottom of the window. |
| 243 | pub(crate) fn timeline_h(lanes: usize) -> f32 { | 246 | pub(crate) fn timeline_h(lanes: usize) -> f32 { |
crates/app/src/transport.rsmodified+4 -2
| @@ -81,8 +81,10 @@ impl Volume { | |||
| 81 | u32::from(self.steps) * 100 / u32::from(Self::MAX_STEPS) | 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 | 84 | + /// What the button read before the mute state became a glyph and a colour |
| 85 | - /// next press of the mute key brings back. | 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 | pub(crate) fn label(self) -> String { | 88 | pub(crate) fn label(self) -> String { |
| 87 | let percent = u32::from(self.steps) * 100 / u32::from(Self::MAX_STEPS); | 89 | let percent = u32::from(self.steps) * 100 / u32::from(Self::MAX_STEPS); |
| 88 | if self.muted { | 90 | if self.muted { |
crates/app/src/ui/theme.rsmodified+7 -27
| @@ -99,7 +99,6 @@ palette! { | |||
| 99 | SCRIM: u32, | 99 | SCRIM: u32, |
| 100 | SCRIM_LIGHT: u32, | 100 | SCRIM_LIGHT: u32, |
| 101 | STROKE_DIVIDER: u32, | 101 | STROKE_DIVIDER: u32, |
| 102 | - STROKE_FOCUS: u32, | ||
| 103 | STROKE_SELECTED: u32, | 102 | STROKE_SELECTED: u32, |
| 104 | FG_PRIMARY: u32, | 103 | FG_PRIMARY: u32, |
| 105 | FG_SECONDARY: u32, | 104 | FG_SECONDARY: u32, |
| @@ -229,7 +228,9 @@ impl PaletteId { | |||
| 229 | } | 228 | } |
| 230 | 229 | ||
| 231 | /// The numbers themselves, for anything that has to measure a family that | 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 | pub fn palette(self) -> &'static Palette { | 234 | pub fn palette(self) -> &'static Palette { |
| 234 | &PALETTES[self as usize] | 235 | &PALETTES[self as usize] |
| 235 | } | 236 | } |
| @@ -320,9 +321,6 @@ pub mod cool { | |||
| 320 | 321 | ||
| 321 | // -- strokes ---------------------------------------------------------------- | 322 | // -- strokes ---------------------------------------------------------------- |
| 322 | pub const STROKE_DIVIDER: u32 = 0x2a3442; | 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 | pub const STROKE_SELECTED: u32 = 0x22d3ee; | 324 | pub const STROKE_SELECTED: u32 = 0x22d3ee; |
| 327 | 325 | ||
| 328 | // -- text ------------------------------------------------------------------- | 326 | // -- text ------------------------------------------------------------------- |
| @@ -395,7 +393,6 @@ pub mod warm { | |||
| 395 | 393 | ||
| 396 | // -- strokes ---------------------------------------------------------------- | 394 | // -- strokes ---------------------------------------------------------------- |
| 397 | pub const STROKE_DIVIDER: u32 = 0x3a322e; | 395 | pub const STROKE_DIVIDER: u32 = 0x3a322e; |
| 398 | - pub const STROKE_FOCUS: u32 = 0xffc38a; | ||
| 399 | pub const STROKE_SELECTED: u32 = ACCENT_PRIMARY; | 396 | pub const STROKE_SELECTED: u32 = ACCENT_PRIMARY; |
| 400 | 397 | ||
| 401 | // -- text ------------------------------------------------------------------- | 398 | // -- text ------------------------------------------------------------------- |
| @@ -461,7 +458,6 @@ pub mod forest { | |||
| 461 | 458 | ||
| 462 | // -- strokes ---------------------------------------------------------------- | 459 | // -- strokes ---------------------------------------------------------------- |
| 463 | pub const STROKE_DIVIDER: u32 = 0x25362c; | 460 | pub const STROKE_DIVIDER: u32 = 0x25362c; |
| 464 | - pub const STROKE_FOCUS: u32 = 0xffd166; | ||
| 465 | pub const STROKE_SELECTED: u32 = ACCENT_PRIMARY; | 461 | pub const STROKE_SELECTED: u32 = ACCENT_PRIMARY; |
| 466 | 462 | ||
| 467 | // -- text ------------------------------------------------------------------- | 463 | // -- text ------------------------------------------------------------------- |
| @@ -526,7 +522,6 @@ pub mod violet { | |||
| 526 | 522 | ||
| 527 | // -- strokes ---------------------------------------------------------------- | 523 | // -- strokes ---------------------------------------------------------------- |
| 528 | pub const STROKE_DIVIDER: u32 = 0x2e3150; | 524 | pub const STROKE_DIVIDER: u32 = 0x2e3150; |
| 529 | - pub const STROKE_FOCUS: u32 = 0xfde68a; | ||
| 530 | pub const STROKE_SELECTED: u32 = ACCENT_PRIMARY; | 525 | pub const STROKE_SELECTED: u32 = ACCENT_PRIMARY; |
| 531 | 526 | ||
| 532 | // -- text ------------------------------------------------------------------- | 527 | // -- text ------------------------------------------------------------------- |
| @@ -586,7 +581,6 @@ pub mod rose { | |||
| 586 | 581 | ||
| 587 | // -- strokes ---------------------------------------------------------------- | 582 | // -- strokes ---------------------------------------------------------------- |
| 588 | pub const STROKE_DIVIDER: u32 = 0x332f33; | 583 | pub const STROKE_DIVIDER: u32 = 0x332f33; |
| 589 | - pub const STROKE_FOCUS: u32 = 0xfcd34d; | ||
| 590 | pub const STROKE_SELECTED: u32 = ACCENT_PRIMARY; | 584 | pub const STROKE_SELECTED: u32 = ACCENT_PRIMARY; |
| 591 | 585 | ||
| 592 | // -- text ------------------------------------------------------------------- | 586 | // -- text ------------------------------------------------------------------- |
| @@ -631,8 +625,7 @@ pub mod rose { | |||
| 631 | } | 625 | } |
| 632 | 626 | ||
| 633 | /// Family F: a graphite ground -- neutral, a touch warm -- under one gold | 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 | 628 | +/// accent. |
| 635 | -/// keyboard's ring is the one thing that may never be mistaken for it. | ||
| 636 | pub mod amber { | 629 | pub mod amber { |
| 637 | // -- surfaces --------------------------------------------------------------- | 630 | // -- surfaces --------------------------------------------------------------- |
| 638 | pub const BG_CANVAS: u32 = 0x0d0d0c; | 631 | pub const BG_CANVAS: u32 = 0x0d0d0c; |
| @@ -649,7 +642,6 @@ pub mod amber { | |||
| 649 | 642 | ||
| 650 | // -- strokes ---------------------------------------------------------------- | 643 | // -- strokes ---------------------------------------------------------------- |
| 651 | pub const STROKE_DIVIDER: u32 = 0x35352f; | 644 | pub const STROKE_DIVIDER: u32 = 0x35352f; |
| 652 | - pub const STROKE_FOCUS: u32 = 0x7dd3fc; | ||
| 653 | pub const STROKE_SELECTED: u32 = ACCENT_PRIMARY; | 645 | pub const STROKE_SELECTED: u32 = ACCENT_PRIMARY; |
| 654 | 646 | ||
| 655 | // -- text ------------------------------------------------------------------- | 647 | // -- text ------------------------------------------------------------------- |
| @@ -709,9 +701,6 @@ pub mod ocean { | |||
| 709 | 701 | ||
| 710 | // -- strokes ---------------------------------------------------------------- | 702 | // -- strokes ---------------------------------------------------------------- |
| 711 | pub const STROKE_DIVIDER: u32 = 0x1e2d42; | 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 | pub const STROKE_SELECTED: u32 = ACCENT_PRIMARY; | 704 | pub const STROKE_SELECTED: u32 = ACCENT_PRIMARY; |
| 716 | 705 | ||
| 717 | // -- text ------------------------------------------------------------------- | 706 | // -- text ------------------------------------------------------------------- |
| @@ -772,7 +761,6 @@ pub mod ice { | |||
| 772 | 761 | ||
| 773 | // -- strokes ---------------------------------------------------------------- | 762 | // -- strokes ---------------------------------------------------------------- |
| 774 | pub const STROKE_DIVIDER: u32 = 0x223140; | 763 | pub const STROKE_DIVIDER: u32 = 0x223140; |
| 775 | - pub const STROKE_FOCUS: u32 = 0xfcd34d; | ||
| 776 | pub const STROKE_SELECTED: u32 = ACCENT_PRIMARY; | 764 | pub const STROKE_SELECTED: u32 = ACCENT_PRIMARY; |
| 777 | 765 | ||
| 778 | // -- text ------------------------------------------------------------------- | 766 | // -- text ------------------------------------------------------------------- |
| @@ -831,9 +819,6 @@ pub mod orchid { | |||
| 831 | 819 | ||
| 832 | // -- strokes ---------------------------------------------------------------- | 820 | // -- strokes ---------------------------------------------------------------- |
| 833 | pub const STROKE_DIVIDER: u32 = 0x33203f; | 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 | pub const STROKE_SELECTED: u32 = ACCENT_PRIMARY; | 822 | pub const STROKE_SELECTED: u32 = ACCENT_PRIMARY; |
| 838 | 823 | ||
| 839 | // -- text ------------------------------------------------------------------- | 824 | // -- text ------------------------------------------------------------------- |
| @@ -901,9 +886,6 @@ pub mod nord { | |||
| 901 | 886 | ||
| 902 | // -- strokes ---------------------------------------------------------------- | 887 | // -- strokes ---------------------------------------------------------------- |
| 903 | pub const STROKE_DIVIDER: u32 = 0x434c5e; | 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 | pub const STROKE_SELECTED: u32 = ACCENT_PRIMARY; | 889 | pub const STROKE_SELECTED: u32 = ACCENT_PRIMARY; |
| 908 | 890 | ||
| 909 | // -- text ------------------------------------------------------------------- | 891 | // -- text ------------------------------------------------------------------- |
| @@ -955,9 +937,9 @@ pub mod nord { | |||
| 955 | /// and `bg2` are the surfaces verbatim and `fg1`..`fg4` the ink; the clip bodies | 937 | /// and `bg2` are the surfaces verbatim and `fg1`..`fg4` the ink; the clip bodies |
| 956 | /// are the neutral-mode hues taken down for the same reason Nord's are. | 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 | 940 | +/// Two of its colours do two jobs here rather than one: orange is the accent |
| 959 | -/// accent, green the playhead, blue the focus ring -- so the family is | 941 | +/// and green the playhead -- so the family is recognisable from the chrome and |
| 960 | -/// recognisable from the chrome and not only from the ground. | 942 | +/// not only from the ground. |
| 961 | pub mod gruvbox { | 943 | pub mod gruvbox { |
| 962 | // -- surfaces --------------------------------------------------------------- | 944 | // -- surfaces --------------------------------------------------------------- |
| 963 | pub const BG_CANVAS: u32 = 0x1d2021; | 945 | pub const BG_CANVAS: u32 = 0x1d2021; |
| @@ -974,7 +956,6 @@ pub mod gruvbox { | |||
| 974 | 956 | ||
| 975 | // -- strokes ---------------------------------------------------------------- | 957 | // -- strokes ---------------------------------------------------------------- |
| 976 | pub const STROKE_DIVIDER: u32 = 0x504945; | 958 | pub const STROKE_DIVIDER: u32 = 0x504945; |
| 977 | - pub const STROKE_FOCUS: u32 = 0x83a598; | ||
| 978 | pub const STROKE_SELECTED: u32 = ACCENT_PRIMARY; | 959 | pub const STROKE_SELECTED: u32 = ACCENT_PRIMARY; |
| 979 | 960 | ||
| 980 | // -- text ------------------------------------------------------------------- | 961 | // -- text ------------------------------------------------------------------- |
| @@ -1036,7 +1017,6 @@ pub mod dracula { | |||
| 1036 | 1017 | ||
| 1037 | // -- strokes ---------------------------------------------------------------- | 1018 | // -- strokes ---------------------------------------------------------------- |
| 1038 | pub const STROKE_DIVIDER: u32 = 0x44475a; | 1019 | pub const STROKE_DIVIDER: u32 = 0x44475a; |
| 1039 | - pub const STROKE_FOCUS: u32 = 0x8be9fd; | ||
| 1040 | pub const STROKE_SELECTED: u32 = ACCENT_PRIMARY; | 1020 | pub const STROKE_SELECTED: u32 = ACCENT_PRIMARY; |
| 1041 | 1021 | ||
| 1042 | // -- text ------------------------------------------------------------------- | 1022 | // -- text ------------------------------------------------------------------- |
vendor/rusty_h264-common/src/deblock.rsmodified+3 -0
| @@ -330,6 +330,9 @@ fn bs1_tile(p: &Blk, q: &Blk) -> bool { | |||
| 330 | /// Boundary strength from tile entries (spec §8.7.2.1). | 330 | /// Boundary strength from tile entries (spec §8.7.2.1). |
| 331 | /// Branchless for the same reason as [`BlockInfo::bs_branchless`], but now with | 331 | /// Branchless for the same reason as [`BlockInfo::bs_branchless`], but now with |
| 332 | /// every operand already in a register rather than behind a strided load. | 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 | #[inline] | 336 | #[inline] |
| 334 | fn bs_tile(p: &Blk, q: &Blk, mb_edge: bool) -> i32 { | 337 | fn bs_tile(p: &Blk, q: &Blk, mb_edge: bool) -> i32 { |
| 335 | let intra = !(p.inter & q.inter); | 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 | /// A/B: restore half→scratch→avg compose for one-filter qpel (`RS_H264_QPEL_COMPOSE=1`). | 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 | #[inline] | 515 | #[inline] |
| 514 | fn qpel_compose() -> bool { | 516 | fn qpel_compose() -> bool { |
| 515 | use std::sync::OnceLock; | 517 | use std::sync::OnceLock; |