Skip to content

fix(android): frozen snapshot rendering#14

Merged
friofry merged 2 commits into
masterfrom
ab/issue-21051-fix-snapshot-rendering
May 28, 2026
Merged

fix(android): frozen snapshot rendering#14
friofry merged 2 commits into
masterfrom
ab/issue-21051-fix-snapshot-rendering

Conversation

@friofry
Copy link
Copy Markdown
Collaborator

@friofry friofry commented May 27, 2026

  • Prefer GPU rendering, fallback to software
  • Do not stretch the snapshot image, enable clipping
freeze2.mp4

@friofry friofry requested review from alexjba and Copilot May 27, 2026 15:04
@friofry friofry force-pushed the ab/issue-21051-fix-snapshot-rendering branch from 3d2063a to aecd4b9 Compare May 27, 2026 15:05
Copy link
Copy Markdown

Copilot AI left a comment

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 improves Android frozen snapshot rendering by preferring GPU-backed capture and preventing the freeze overlay from stretching after the item is resized.

Changes:

  • Adds Android PixelCopy-based freeze snapshot capture with software draw fallback.
  • Enables clipping while the freeze overlay is visible and restores prior clip state on unfreeze.
  • Stops resizing the freeze overlay on later geometry changes and adds a common backend regression test.

Reviewed changes

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

File Description
mobilewebview/android/src/org/mobilewebview/MobileWebView.java Adds PixelCopy snapshot capture path and shared snapshot delivery helpers.
mobilewebview/src/common/mobilewebviewbackend.cpp Enables clipping during freeze, restores clip state, and stops updating overlay size on geometry changes.
mobilewebview/src/common/mobilewebviewbackend_p.h Adds state and helper declaration for freeze clip restoration.
mobilewebview/tests/tst_mobilewebviewbackend_common.mm Adds a regression test for keeping freeze overlay size after resize.

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

Comment thread mobilewebview/android/src/org/mobilewebview/MobileWebView.java
Comment thread mobilewebview/src/common/mobilewebviewbackend.cpp
* fallback to software rendering
* size overlay from captured image dimensions
@friofry friofry force-pushed the ab/issue-21051-fix-snapshot-rendering branch from aecd4b9 to 0bdd6c6 Compare May 27, 2026 15:29
@alexjba
Copy link
Copy Markdown

alexjba commented May 28, 2026

I still think the simplest solution would be to move the webview to the right with the navbar instead of squeezing it.
Then we would hopefully not need any stretch or additional handling. Just a 1-1 replacement of the webview

@friofry
Copy link
Copy Markdown
Collaborator Author

friofry commented May 28, 2026

I still think the simplest solution would be to move the webview to the right with the navbar instead of squeezing it. Then we would hopefully not need any stretch or additional handling. Just a 1-1 replacement of the webview

Yeah, here is the issue for keeping the navbar open:

status-im/status-app#21057

I think this PR is still useful for disabling stretching in case of other geometry changes, such as on the keyboard display

@friofry friofry merged commit 2dbf28d into master May 28, 2026
2 checks 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.

3 participants