refactor: fold single-use helpers into their call sites

Collapses indirection layers and one-caller abstractions across the video
player, shortcut dispatch, shader loading and context-menu code, including
the VideoPIPManager pass-through over PipService.
This commit is contained in:
edde746
2026-07-26 06:09:49 +02:00
parent 7416327d4b
commit 83f4e2a263
15 changed files with 443 additions and 598 deletions
@@ -136,6 +136,21 @@ void main() {
}
});
test('repeats the restore pass in place for doubled Anime4K modes', () async {
final shaders = await ShaderAssetLoader.getAnime4KShaders(
const Anime4KConfig(quality: Anime4KQuality.fast, mode: Anime4KMode.modeBB),
);
expect(shaders.map(path.basename).toList(), [
'Anime4K_Clamp_Highlights.glsl',
'Anime4K_Restore_CNN_M.glsl',
'Anime4K_Restore_CNN_M.glsl',
'Anime4K_Upscale_CNN_x2_M.glsl',
'Anime4K_AutoDownscalePre_x2.glsl',
]);
expect(shaders[1], shaders[2]);
});
test('nested and non-GLSL names are rejected without touching matching files', () async {
final customDirectory = Directory(path.join(supportDirectory.path, 'custom_shaders'))..createSync(recursive: true);
final nested = File(path.join(customDirectory.path, 'subdir', 'name.glsl'))