{{ message }}
fix(android): Avoid white flash on first frame#23593
Open
MartinZikmund wants to merge 1 commit into
Open
Conversation
Hold the splash screen (OnPreDraw) until the GL thread has flushed the first Skia frame, so it is dismissed only once pixels are ready. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01KBAigLEAf3csGwnWE22Yr5
Contributor
|
|
||
| _context!.Flush(); | ||
|
|
||
| if (!ApplicationActivity.Instance.FirstFrameRendered) |
Contributor
There was a problem hiding this comment.
The equivalent signaling is missing from UnoSKVulkanView.RenderFrame(). When FeatureConfiguration.Rendering.UseVulkanOnSkiaAndroid = true, the Vulkan renderer renders frames but never sets FirstFrameRendered = true, so OnPreDraw() keeps returning false and the splash screen is held forever.
The same block (set flag → post Invalidate) should be placed after _vulkanContext.RenderFrame(...) in UnoSKVulkanView.RenderFrame().
Contributor
|
🤖 Your WebAssembly Skia Sample App stage site is ready! Visit it here: https://unowasmprstaging.z20.web.core.windows.net/pr-23593/wasm-skia-net9/index.html |
Contributor
Xiaoy312
approved these changes
Jun 30, 2026
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.

Avoids the white flash between Android splash-screen dismissal and the first Skia paint.
The splash is held (
OnPreDrawkeeps returningfalse) until the GL thread has flushed the first Skia frame. Avolatile bool FirstFrameRenderedis set on the GL thread after the first_context.Flush(), which posts an invalidation soOnPreDrawre-evaluates and dismisses the splash only once pixels are actually ready.Validation
Uno.UI.Runtime.Skia.Android.csproj(net10.0-android) builds clean — 0 errors (pre-existing XA0101@(Content)warning only).🤖 Generated with Claude Code
https://claude.ai/code/session_01KBAigLEAf3csGwnWE22Yr5