feat(tvos): add Canvas platform support - #144
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
force-pushed
the
contrib/tvos-support
branch
from
September 8, 2026 16:21
193234f to
1dffcab
Compare
LorenzGit
marked this pull request as ready for review
September 8, 2026 18:44
triniwiz
added a commit
that referenced
this pull request
Sep 14, 2026
Brings in #144-#149. Conflict resolution notes: * #147 (V8 14 native bridge) overlapped almost entirely with the V8 14 migration this branch already carries. Both sides fix the same API break; master does it with dual-version shims (canvas::GetAlignedPointer, canvas::Receiver, CANVAS_FAST_FUNCTION, #if V8_MAJOR_VERSION >= 14) so one tree can build against V8 10.3 and 14, while this branch targets a single vendored V8 14.9 (tools/scripts/download-v8.sh) and calls the native APIs directly. 118 of the 127 conflicting sources were that difference alone -- after rewriting master's shims into this branch's idiom, 112 compared byte-identical -- so those keep this branch's spelling and the now-unused shim block is dropped from Common.h. * Master's shims also compile fast API calls out on V8 >= 14 (CANVAS_FAST_FUNCTION -> v8::CFunction{}, c_function -> nullptr). V8 14.9 still declares both FunctionTemplate::New(..., const CFunction*) and NewWithCFunctionOverloads, and this branch's fast paths are built against it, so taking that would have silently disabled every fast call in the binding layer. Helpers.h keeps this branch's version; the four CANVAS_FAST_FUNCTION call sites that auto-merged into OES_vertex_array_objectImpl and WEBGL_draw_buffersImpl -- no conflict was raised for those -- are restored to v8::CFunction::Make. * Master's *Array fast overloads are all guarded #if V8_MAJOR_VERSION < 14, so they are dead on 14 and equivalent to this branch having removed them. * #149 (ImageData double free) applies unchanged. canvas_native_image_data_get_data borrows its argument and returns a U8Buffer holding a second refcounted handle to the same pixels, so ImageDataBuffer must release only the buffer -- ~ImageDataImpl already releases the ImageData. The comment is reworded from master's, which described the buffer as owning a clone of the pixel storage; it is a shared handle, and that is what makes the JS data view live. * Package versions stay on the 3.0.0-alpha line. * canvas-release.aar keeps this branch's binary; it predates the Android render fixes in 638a265 and needs rebuilding from the merged sources.
triniwiz
added a commit
that referenced
this pull request
Sep 14, 2026
triniwiz/rust-skia 91bf15b -> 1eafe30 (skia-safe 0.101.0 -> 0.153.4). No
source changes needed: FontMgr::new_from_data, fixed up in the 0.101 bump,
is the only break either step introduced, and canvas-2d, canvas-core and
canvas-svg all build clean.
The fork's platform support grew tvOS alongside visionOS
(skia-bindings/build_support/platform/{tvos,visionos}.rs), which lines up
with the tvOS targets #144 added to the Makefile.
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.
Add native tvOS targets, Rust platform gates, Siri Remote forwarding, tvOS storage/media guards, and CanvasSVG configuration. Keep OpenGL ES enabled on tvOS and exclude the private Cargo path override.
Validation
Both arm64 tvOS CanvasNative slices built from source. The pinned integration app passes platform, Canvas 2D, WebGL and WebGPU checks on the simulator. Current V8 requires #147; compute-only mapping also needs #148. The reviewer setup supplies the pinned rust-skia override until that dependency lands.
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,
1dffcabf119046d7bea2c402150be24f0982ff1a, changing 41 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.