Fix iOS Metal foreground framebuffer reset#5351
Open
shai-almog wants to merge 3 commits into
Open
Conversation
Contributor
✅ Continuous Quality ReportTest & Coverage
Static Analysis
Generated automatically by the PR CI workflow. |
Collaborator
Author
|
Compared 139 screenshots: 139 matched. |
Collaborator
Author
|
Compared 142 screenshots: 142 matched. Benchmark Results
Detailed Performance Metrics
|
Collaborator
Author
|
Compared 216 screenshots: 216 matched. |
Collaborator
Author
|
Compared 143 screenshots: 143 matched. Benchmark Results
Build and Run Timing
Detailed Performance Metrics
|
Collaborator
Author
|
Compared 137 screenshots: 137 matched. Benchmark Results
Build and Run Timing
Detailed Performance Metrics
|
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.
Summary
Fixes #5349.
The iOS Metal renderer keeps a persistent private
screenTexturebecause Codename One may flush only dirty regions between frames. After iOS suspension, that private retained texture can be discarded or stale while the app resumes with partial dirty-region paints, leaving missing component pieces until touch or scroll forces a larger repaint.This PR marks the Metal retained framebuffer invalid on foreground, requests a full repaint, and clears the persistent screen texture only when the next drain has screen-targeted full-frame work. The hooks are optional on the shared rendering-view protocol so OpenGL and watch renderers are unaffected.
Validation
git diff --checkXCODE_APP=/Applications/Xcode.app ./scripts/build-ios-app.sh -q -DskipTestsXCODE_APP=/Applications/Xcode.app ./scripts/run-ios-native-tests.sh /Users/shai/dev/cn3/CodenameOne/scripts/hellocodenameone/ios/target/hellocodenameone-ios-1.0-SNAPSHOT-ios-source/HelloCodenameOne.xcworkspace HelloCodenameOne