fix(android): Avoid white flash on first frame#23593
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
|
Claude finished @MartinZikmund's task in 2m 49s —— View job PR Review: fix(android): Avoid white flash on first frame
SummaryVerdict: fix-first — 1 blocking issue. The mechanism is correct for the OpenGL path: a Blocking (1)
Informational (no action required)
Runtime validation pending — as noted in the PR description, device/CI confirmation is still outstanding. |
|
|
||
| _context!.Flush(); | ||
|
|
||
| if (!ApplicationActivity.Instance.FirstFrameRendered) |
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().
|
🤖 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 |
|
The build 220110 found UI Test snapshots differences: Details
|
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