Repository navigation
Precompute artwork palettes and restore fast theme fades - #24
Merged
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Artwork Dynamic currently computes colours during focus changes, averages unrelated artwork hues, and animates the root theme while replacing its expressive tokens. This makes browsing do avoidable work and can produce muddy colours.
Successful Coil image loads now queue background palette extraction from the decoded bitmap. A 96×96 sample feeds AndroidX Palette; Aperture ranks populated, saturated swatches and ignores transparent pixels, near-black/white and near-grey candidates. Hardware bitmaps use a small software sample without recycling the displayed image. At most two extractions run concurrently, and requests for the same artwork coalesce.
Room stores the selected seed by artwork path and extraction version. Database migration 7→8 adds the palette table while retaining the existing library and playback tables. Focus changes only observe the table after a 140 ms settle delay: they do not download or decode artwork. A pending row updates the theme as soon as extraction saves it. Metadata/artwork changes select the current path automatically; renaming without changing artwork reuses its palette. Cinematic Ambient uses the same store and can prefetch a missing next backdrop using the renderer's URL.
Browsing and cinematic logos share Material tonal colour roles. Dynamic primary, secondary and tertiary roles are opaque, with paired foreground/container colours. The secondary source has reduced saturation and the tertiary source shifts hue by 60 degrees; these are Aperture palette choices. Theme colours fade with the existing fast Material Expressive effects spring. The token object and semantic colour scheme stay stable throughout the fade, so unchanged spacing, shape and motion consumers are not invalidated every frame. Named themes and the approved Material TV logo palette remain available.
Validation on 709ba94:
Physical-TV frame-time profiling and subjective review against a real media library remain outstanding. No measured FPS or speedup is claimed.