Skip to content

fix(android): avoid recycled glass captures and hidden refreshes - #153

Open
OskarEichler wants to merge 1 commit into
sbaiahmed1:mainfrom
OskarEichler:codex/blur-android-backdrop-lifetime
Open

OskarEichler wants to merge 1 commit into
sbaiahmed1:mainfrom
OskarEichler:codex/blur-android-backdrop-lifetime

Conversation

@OskarEichler

Copy link
Copy Markdown
Contributor

Fix

Read the shared bitmap after an acquire that can recycle it during a resize. Reuse one visibility predicate for pre-draw, refresh and ticker scheduling, including rechecking after a reentrant hide/detach.

Compatibility / breaking changes

No cadence, downsampling, shader or API changes. Hidden/detached views no longer perform otherwise unnecessary capture work; resized roots use the current bitmap.

Verification

Compiled extracted Kotlin/API doubles reproduce a stale recycled bitmap and five hidden/detached/reentrant refresh failures on baseline; all fixed cases pass. Full Android source/codegen compilation and app builds pass.

Combined review branch: 40 existing Jest tests across four suites, TypeScript, ESLint (three pre-existing inline-style warnings), Bob builds, web-entry graph validation and whitespace checks passed. No checked-in tests/specs were added or changed. Consumer integration passed both products’ Android Debug and iOS Simulator Debug builds, four production Metro bundles, 13 web targets and four browser-extension targets. The upstream example built for Android and iOS, exported for web, and its iOS home screen was launched and visually inspected. Physical-device, signed-release and Android runtime testing were not performed.

Closes #138

@coderabbitai

coderabbitai Bot commented Aug 27, 2026

Copy link
Copy Markdown

Warning

Review limit reached

Next included review available in 59 minutes.

View limit details

Limit details: You’ve used all 2 included reviews currently available.

You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.

Learn how review limits work.

Review configuration:

⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: 778f2b4e-0172-4cba-922b-cef86be1f090

📥 Commits

Reviewing files that changed from the base of the PR and between 3847707 and e26a876.

📒 Files selected for processing (1)
  • android/src/main/java/com/sbaiahmed1/reactnativeblur/ReactNativeLiquidGlassView.kt

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@DanielAraldi DanielAraldi added the android Android only label Aug 31, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

android Android only

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Android liquid glass can draw a recycled bitmap after root resize

2 participants