Repository navigation
perf(tvos): defer Metal drawable acquisition until drawing - #146
Merged
Merged
Conversation
|
Important Review skippedAuto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Advanced Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
This was referenced Sep 8, 2026
LorenzGit
marked this pull request as ready for review
September 8, 2026 18:44
triniwiz
added a commit
that referenced
this pull request
Nov 7, 2026
… changes off main (#190) * fix(ios): take the Metal drawable on first draw; threaded WebGL layer changes off main Metal 2D presented and then immediately took the next drawable, holding one of the layer's drawables between frames. It now takes it on the frame's first draw, as tvOS already did (#146). Offscreen Metal contexts are unchanged. Threaded WebGL called renderbufferStorage:fromDrawable: (and, for Worker transfers, setDrawableProperties:) on the WebGL thread, which modifies the CanvasGLView's backing layer and made UIKit log "Modifying properties of a view's layer off the main thread". Both now run inside an explicit CATransaction with actions disabled when off main. Adds a lifecycle spec checking 2D contents survive presents and idle frames. * chore: rebuild Android and Apple native libraries Includes the Metal drawable and threaded WebGL layer fixes, and #187's CanvasJSIModule change in libcanvasnativev8.so.
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.
Align Metal presentation with display-link frame boundaries and preserve the existing iOS presentation path.
Validation
The full Nova Relay game was rebuilt on NativeScript 9.1 / V8 14.9 and tested on a physical Apple TV 4K with an A12 GPU. The signed Release build completed an eight-wave, four-pilot mission at 59.94 FPS (p95 16.717 ms; max 28.197 ms; 11,806 samples), then 65 seconds of 4× spawn stress at 59.94 FPS (p95 16.701 ms; max 19.331 ms; 3,717 samples). Three.js, PixiJS, bloom and sound were active at balanced quality. FPS is 1000 / mean frame interval, excluding the first three seconds and non-playing frames. No graphics/feedback errors were recorded. The owner confirmed physical controller joining/movement, sound and rumble.
The separate pixel diagnostic exposed an ImageData ownership bug, fixed independently in #149. The final benchmark included that fix; this pacing PR remains unchanged.
Reproduce
Revision-pinned reviewer setup builds the companion stack in an isolated workspace. It includes commands, requirements, dependency pins and physical-device limitations. No binary artifacts or private development paths are committed.
This PR contains one commit,
b7eab94b94f931ac86dade7f0a84afdd020c5143, changing 3 files against1fd6ef470dfdfd43b3385fa7ef43feddd1debd06. Its exported patch reproduces the committed tree from a fresh base index.The source-built runtime was validated in the prepared runtime checkout; companion clones, native helpers, Canvas and clean npm installation were validated in a separate workspace on the same Mac. A second machine and one uninterrupted cold
allrun have not been tested.