Fix iOS Metal foreground framebuffer reset - #5351
Conversation
✅ Continuous Quality ReportTest & Coverage
Static Analysis
Generated automatically by the PR CI workflow. |
|
Compared 139 screenshots: 139 matched. |
|
Compared 142 screenshots: 142 matched. Benchmark Results
Detailed Performance Metrics
|
|
Compared 216 screenshots: 216 matched. |
|
Compared 143 screenshots: 143 matched. Benchmark Results
Build and Run Timing
Detailed Performance Metrics
|
|
Compared 137 screenshots: 137 matched. Benchmark Results
Build and Run Timing
Detailed Performance Metrics
|
…ned-framebuffer # Conflicts: # .github/workflows/purchase-e2e.yml
|
Compared 144 screenshots: 144 matched. Native Android coverage
✅ Native Android screenshot tests passed. Native Android coverage
Benchmark ResultsDetailed Performance Metrics
|
|
Compared 135 screenshots: 135 matched. |
|
Compared 140 screenshots: 140 matched. Benchmark ResultsDetailed Performance Metrics
|
|
Compared 141 screenshots: 141 matched. |
|
Compared 141 screenshots: 141 matched. |
… shift + rounded dark MultiButton GL (16), Metal (16), tv (5), watch (9) renders reviewed against the mac goldens from the merged tree. The old GL/Metal goldens carried pre-#5351 renders where the Metal/GL foreground erase dropped button pills and text-field glass cells (ButtonTheme_dark golden showed bare blue text and H=7mm vs the correct glass pills at H=5mm); the new renders restore them. Remaining churn is the #5358 TextArea vertical alignment shift plus the rounded dark MultiButton fix (74599f4), now confirmed rounded on metal, tv and watch. Deliberately NOT accepted: AnimateLayoutScreenshotTest-family goldens (their committed renders lost the tile text in the final frames on all ParparVM runtimes -- iOS GL/Metal/JS -- while JVM/ART runtimes keep it; that regression is being tracked down separately and the goldens will be refreshed when it is fixed). Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
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