Skip to content

[compose-richtext] Avoid inactive streaming accent layouts#78

Merged
pat-oai merged 1 commit into
mainfrom
ph/streaming-accent-layout-guard
Jun 1, 2026
Merged

[compose-richtext] Avoid inactive streaming accent layouts#78
pat-oai merged 1 commit into
mainfrom
ph/streaming-accent-layout-guard

Conversation

@pat-oai

@pat-oai pat-oai commented Jun 1, 2026

Copy link
Copy Markdown

What changed

  • Skip preparing the streaming accent overlay layout unless an accent is configured and at least one accent animation is active.
  • Make the overlay draw modifier a no-op when there are no active accent animations.

Why

The streaming accent API is optional, but the merged implementation prepared a second text layout for every animated rich text leaf before checking whether the accent feature was active. Existing animate = true callers without streamingTextAccent should not pay that extra layout cost.

Validation

  • JAVA_HOME=/opt/homebrew/Cellar/openjdk@21/21.0.10/libexec/openjdk.jdk/Contents/Home ./gradlew :richtext-ui:jvmTest
  • git diff --check

@pat-oai pat-oai marked this pull request as ready for review June 1, 2026 20:37
@pat-oai pat-oai merged commit 0790141 into main Jun 1, 2026
1 check passed
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.

1 participant