Repository navigation
Rebuild the Android swapchain at the window's size after a rotation - #45
Merged
Merged
Conversation
Xget7
force-pushed
the
fix-android-rotation
branch
from
October 20, 2026 14:10
9a4ea78 to
d77ab40
Compare
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
Android reports a surface's new size only after a frame is presented, so a swapchain rebuilt inside
resizecame back at the old size and nothing rebuilt it again once the pre-transform matched (portrait).VulkanSurfacekeeps the window's size as the target and no longer depends on SUBOPTIMAL; pre-transform, present modes and formats are untouched.SplatRenderer::surfaceRebuildPending()(default false, so Metal is unchanged) keeps the on-demand engine presenting until the rebuild lands.Evidence
Screenshots:
/Users/xget/.rn-build-external/smoke-android/rot-main/3-portrait-again.png,/Users/xget/.rn-build-external/smoke-android/rot-main/4-now.png; log/Users/xget/.rn-build-external/smoke-android/rot-main/log.txt.Screenshots:
/Users/xget/.rn-build-external/rotation-after/{1-rot0,2-rot1,3-rot0,4-rot3,5-rot0,6-resume}.png; log/Users/xget/.rn-build-external/rotation-after/log.txt.FrameOrder.RendererWithAPendingSurfaceRebuildKeepsTheEngineDrawingUntilItSettles, written first and failing (1 draw, expected 3), then passing with the full engine suite (283 tests, kitchen fixtures skipped);scripts/lint-cpp.shclean,:splatkit:assembleRelease :app:assembleRelease :splatkit:testDebugUnitTest, the host WorldFrameCompletion check;Merge Danger
Door: Two-way.
Blast Radius: Android
Every Android swapchain rebuild now goes through the new size check, including vsync and linear blending changes.
The engine interface gains one defaulted method, so the Metal renderer and its mirrors are unaffected.