Skip to content

chore(🤖): add shown, a loop-off state and a frame-rate readout to the TransparencyMode diagnostic - #545

Open
YevheniiKotyrlo wants to merge 1 commit into
wcandillon:mainfrom
YevheniiKotyrlo:chore/example-transparency-mode-scenes
Open

YevheniiKotyrlo wants to merge 1 commit into
wcandillon:mainfrom
YevheniiKotyrlo:chore/example-transparency-mode-scenes

Conversation

@YevheniiKotyrlo

@YevheniiKotyrlo YevheniiKotyrlo commented Oct 16, 2026 •

Copy link
Copy Markdown
Contributor

Problem

TransparencyMode holds every Android backing view, opaque, a remount and the loop's cadence, but its loop always presents, so it cannot show what a canvas shows before its first frame, and it cannot configure a canvas before its surface exists; reproducing either takes a screen of its own.

Solution

  • The loop gets a third state, off, which presents nothing, so a remount shows what is on screen before a first frame. The screen reads out the frames presented per second.
  • shown hides the canvas, mounts it again while hidden — configured before its surface exists — and reveals it.
  • The hide/show button reads mounted, since shown now hides without unmounting; its test id is unchanged.

mounted and shown carry the names of react-native-skia's AndroidViews switches (wcandillon/react-native-skia#4252).

Verification

yarn lint · yarn tsc · the package and web-template builds · yarn test:plugin · yarn check-dawn · yarn build:docs. On a Galaxy S23 (Android 14), a release build opening TransparencyMode: each control does what it says, and with the loop off a SurfaceView that remounts stays a black hole until a first frame, the case #561 fixes (screenshots in the comment below). On a Galaxy S23 (Android 14) the whole suite passes, 222 of 222, as on main c080934e. On an iPad Pro 12.9-inch (4th generation, iOS 27.0.1), built and run as CI's iOS job does on a simulator (Debug build, Metro with CI=true), it passed 221 of 221 before the rebase onto #574 (main 8f664fca: 221 of 221).

YevheniiKotyrlo added a commit to YevheniiKotyrlo/react-native-webgpu-evidence that referenced this pull request Oct 16, 2026
@YevheniiKotyrlo

YevheniiKotyrlo commented Oct 16, 2026 •

Copy link
Copy Markdown
Contributor Author

Device evidence — the controls

loop: every frame, the rate read out loop: off: the last frame stays
shown off: the stage, the canvas mounted again while hidden surface, loop: off, remounted: black until a first frame

Galaxy S23 (Android 14, API 34), release build of the example opening TransparencyMode, on main's native code; every control driven through uiautomator, with a screenshot and the frame-rate readout after each step. The last screenshot is a SurfaceView canvas's hole before its first frame, held there by the loop being off.

… TransparencyMode diagnostic

The loop's off state presents nothing, so a remount shows what is on screen
before a first frame. shown hides the canvas, mounts it again while hidden,
so it is configured before its surface exists, and reveals it. The hide/show
button reads mounted, with its test id unchanged, and the screen reads out
the frames presented per second.
@YevheniiKotyrlo
YevheniiKotyrlo force-pushed the chore/example-transparency-mode-scenes branch from c468715 to a43502b Compare October 18, 2026 19:56

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant