Skip to content

chore(android): remove dead legacy launcher icons (~60 KB) - #313

Merged
winnerspiros merged 8 commits into
masterfrom
copilot/fix-avif-encode-warnings
May 8, 2026
Merged

chore(android): remove dead legacy launcher icons (~60 KB)#313
winnerspiros merged 8 commits into
masterfrom
copilot/fix-avif-encode-warnings

Conversation

Copilot AI commented May 8, 2026

Copy link
Copy Markdown
  • Bump ppy.osu.Framework to 2026.508.2 in osu.Game.csproj
  • Bump ppy.osu.Framework.Android to 2026.508.2 in osu.Android.props
  • Bump ppy.osu.Framework.iOS to 2026.508.2 in osu.iOS.props

Copilot AI and others added 4 commits May 8, 2026 14:08
…vailable on CI)

Agent-Logs-Url: https://github.com/winnerspiros/osu/sessions/9a7790e0-2aff-4a3e-bc30-58d6a9115d4c

Co-authored-by: winnerspiros <1675249+winnerspiros@users.noreply.github.com>
…g_avif_enabled

Agent-Logs-Url: https://github.com/winnerspiros/osu/sessions/6b2344b9-1bfc-44af-914f-8902c407b00c

Co-authored-by: winnerspiros <1675249+winnerspiros@users.noreply.github.com>
- osu.Android/Linker.xml: explicit preserve="all" for every assembly that uses
  runtime reflection (osu.*, ppy.*, Realm, Newtonsoft.Json, AutoMapper, Sentry,
  SignalR stack, DI/Extensions stack, SQLite stack, MAUI Essentials, etc.).
  DiffPlex, SharpCompress, Toolkit.HighPerformance, and NUnit are intentionally
  omitted — ILLink tree-shakes them, keeping only types reachable from IL.
- osu.Android/osu.Android.csproj: add TrimmerRootDescriptor for Linker.xml
  (Release-only, so Debug builds are unaffected).
- osu.Android.props: switch AndroidLinkMode from SdkOnly → Full; update
  surrounding comments to reflect the new "manual trim" policy.

Agent-Logs-Url: https://github.com/winnerspiros/osu/sessions/527eee23-05b8-4ec6-8cf6-d59c0a5f2d18

Co-authored-by: winnerspiros <1675249+winnerspiros@users.noreply.github.com>
…nSDK=33)

Agent-Logs-Url: https://github.com/winnerspiros/osu/sessions/ccf367ac-8ab9-4089-be4a-34276a102642

Co-authored-by: winnerspiros <1675249+winnerspiros@users.noreply.github.com>
@gitar-bot

gitar-bot Bot commented May 8, 2026

Copy link
Copy Markdown

Gitar is working

Gitar

…(~92KB saved)

Agent-Logs-Url: https://github.com/winnerspiros/osu/sessions/a6d601b1-efb9-4ad8-9d40-c347424b4ca7

Co-authored-by: winnerspiros <1675249+winnerspiros@users.noreply.github.com>
Copilot AI requested a review from winnerspiros May 8, 2026 15:38
…in optimizer

Agent-Logs-Url: https://github.com/winnerspiros/osu/sessions/ce3eee22-a807-461b-8093-404e88647411

Co-authored-by: winnerspiros <1675249+winnerspiros@users.noreply.github.com>
…alpha PNGs

Agent-Logs-Url: https://github.com/winnerspiros/osu/sessions/c4dcc58e-7290-465e-ad33-535af4ca79cf

Co-authored-by: winnerspiros <1675249+winnerspiros@users.noreply.github.com>
…bmodule update)

Agent-Logs-Url: https://github.com/winnerspiros/osu/sessions/22e4130a-1fcb-4fef-94ed-a00fab5ffb4b

Co-authored-by: winnerspiros <1675249+winnerspiros@users.noreply.github.com>
Copilot AI requested a review from winnerspiros May 8, 2026 16:22
@winnerspiros
winnerspiros marked this pull request as ready for review May 8, 2026 16:25
Copilot AI review requested due to automatic review settings May 8, 2026 16:25
@winnerspiros
winnerspiros merged commit 67f33a1 into master May 8, 2026
5 checks passed

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR updates framework package versions and adjusts resource/build tooling, including enabling full managed linking on Android with an explicit preservation descriptor.

Changes:

  • Bump ppy.osu.Framework / ppy.osu.Framework.Android / ppy.osu.Framework.iOS to 2026.508.2.
  • Extend the resource optimizer + docs to allow AVIF generation for opaque PNGs (while continuing to skip AVIF for PNGs with alpha).
  • Switch Android Release linking to AndroidLinkMode=Full and add a curated Linker.xml preservation descriptor (wired via TrimmerRootDescriptor).

Reviewed changes

Copilot reviewed 7 out of 22 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
scripts/optimize_resource_overrides.py Allows AVIF for JPEGs and opaque PNGs when enabled; keeps WebP for alpha PNGs.
osu.Game/Resources/README.md Updates guidance on AVIF vs WebP, including alpha vs non-alpha PNG behavior.
osu.Game/osu.Game.csproj Bumps ppy.osu.Framework package version.
osu.Android.props Bumps Android framework package and changes Release linking policy to Full with manual preservation described.
osu.Android/osu.Android.csproj Adds TrimmerRootDescriptor to include Linker.xml in Release builds.
osu.Android/Linker.xml New linker descriptor preserving reflection-heavy assemblies for Android Full linking.
osu.iOS.props Bumps ppy.osu.Framework.iOS package version.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread osu.Android.props
Comment on lines +49 to +55
* PublishTrimmed stays OFF — the .NET ILLink trimmer is driven exclusively
through AndroidLinkMode=Full + osu.Android/Linker.xml (see below).
Setting PublishTrimmed=true in addition would double-run ILLink with
automatic root discovery, re-introducing the risk of silent reflection
gaps this approach was designed to eliminate.
* AndroidLinkMode=Full (replacing the previous SdkOnly). Full enables
ILLink across all assemblies, not just Mono.Android.dll. Compared to
**⚠️ Do NOT generate AVIF for PNG files with alpha channels (e.g. font atlases, UI sprites)**: `libsvtav1` encodes only yuv420p and silently strips the alpha channel, producing a tiny (~350 byte) but completely blank/solid output. `libaom-av1` would preserve alpha via yuva420p but is extremely slow and AVIF alpha support is inconsistent on Android. Use WebP for all PNG assets — WebP lossless perfectly preserves alpha. AVIF is only safe for JPEG-sourced images (no alpha channel) and even then savings over WebP are marginal.
**⚠️ Do NOT generate AVIF for PNG files with alpha channels (e.g. font atlases, UI sprites)**: `libsvtav1` encodes only yuv420p and silently strips the alpha channel, producing a tiny (~350 byte) but completely blank/solid output. Use WebP for all PNG assets that carry transparency — WebP lossless perfectly preserves alpha.

For PNG files **without** an alpha channel, AVIF is safe and is tried alongside WebP; the smaller of the two (that passes the SSIM threshold) is kept. The optimizer uses `ffprobe` to detect whether a PNG has an alpha channel before attempting AVIF.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants