Repository navigation
feat: expose GPU Canvas (3D) on iOS and Android - #381
Merged
Merged
Conversation
mfazekas
force-pushed
the
claude/gpu-canvas-beta-android-ios-7ccb40
branch
from
September 21, 2026 18:51
d935add to
808c6a6
Compare
mfazekas
added this pull request to stack #384
September 22, 2026 08:23
mfazekas
removed this pull request from stack #384
September 22, 2026 16:01
mfazekas
force-pushed
the
claude/gpu-canvas-beta-android-ios-7ccb40
branch
2 times, most recently
from
September 24, 2026 02:32
02a5b8f to
137750a
Compare
mfazekas
force-pushed
the
claude/gpu-canvas-beta-android-ios-7ccb40
branch
from
September 28, 2026 04:31
137750a to
c40d615
Compare
mfazekas
added a commit
that referenced
this pull request
Sep 29, 2026
Bumps the pinned native runtimes to the newest releases we can consume: rive-android 11.9.1 → 11.12.1 and rive-ios 6.23.1 → 6.26.0. rive-ios 6.27.0 is tagged on GitHub but was never pushed to CocoaPods trunk, which tops out at 6.26.0, so the podspec can't use it yet. 11.12.1 is also the first safe rive-android pin after 11.9.1: 11.10.0–11.12.0 abort debuggable apps under CheckJNI when a nonexistent boolean view-model property is read (rive-android#470, fixed in 11.12.1). 11.11.0 deprecates the legacy `app.rive.runtime.kotlin` API the legacy backend uses, and 11.12 adds more 12.0 deprecations on the new API; both are compile warnings only, nothing is removed. The only other change is the rive-ios source link in `RiveRuntimeLogger.swift`, repointed at the same lines in 6.26.0. Verified locally, both backends on both platforms (iPhone 17 simulator, Pixel 6 emulator): 1. New backend: iOS 29/29 suites, 209 tests; Android 29/29, 209 tests. 2. Legacy backend: iOS 29/29, 201 passed + 8 skipped; Android 29/29, 201 passed + 8 skipped. #381 pins the same versions, so it will rebase cleanly once this lands. The 0.4.x counterpart is a separate PR against `release-v0.4`. Also switches release-please from beta prereleases to a final release pinned at `0.5.0`, so the release PR after this merges is 0.5.0 and publishes to npm `latest`. `release-as` has to be removed once 0.5.0 is out.
mfazekas
enabled auto-merge (squash)
October 1, 2026 13:02
mfazekas
force-pushed
the
claude/gpu-canvas-beta-android-ios-7ccb40
branch
from
October 2, 2026 14:54
e5fd81e to
2ee96bb
Compare
Both are the first releases that ship GPU Canvas (rive-ios 6.25.0, rive-android 11.12.0). rive-android 11.10+ also surfaces an upstream bug: reading a nonexistent boolean property aborts debuggable apps with "JNI DETECTED ERROR: unexpected jboolean value" because rive-runtime's listViewModelPropertyValue handler still sends a value message with an uninitialized union member after reporting the not-found error. As a mitigation, boolean reads on instances with known ViewModel metadata are validated against the property list before touching the native getter.
… + Android) Adds RiveRuntime.setGPUCanvasEnabled()/isGPUCanvasEnabled(). The setting is process-wide and fixed once the shared render worker exists, like setAndroidRenderBackend; both now live in RiveWorkerConfig per source set. iOS maps to Worker(configuration: .init(enableGPUCanvas:)); Android maps to rive-android's experimental deferred renderer, reached through a Java shim because CommandQueue.createDeferred is Kotlin-internal. No-op on the legacy runtime. Adds the ore.riv GPU Canvas demo page and docs.
Walks the path via ViewModelInstance.create(Reference(parent)) and getViewModelName() so nested and view-obtained instances are covered by the rive-app/rive-android#470 guard too, and caches the result per path. Adds nested-miss cases to the harness test.
11.12.1 fixes rive-app/rive-android#470 in the runtime (a failed property read no longer sends a value message), so the metadata guard in HybridViewModelInstance is gone; the nested-miss harness cases stay as the regression check. Also adds the generated ore.riv.d.ts the lint job requires.
…th a warning CommandQueue.createDeferred is Kotlin-internal, so the GPU Canvas worker was reached through a Java shim that named the mangled method at compile time. A rive-android without that exact symbol (older override, or an upstream rename) broke the build. Look it up reflectively instead, accepting either the mangled or a plain createDeferred; when it is missing the worker is created without GPU Canvas, RiveLog warns, and isGPUCanvasEnabled() turns false.
The status was read once before the file loaded, so on a native SDK without the deferred worker the page said "enabled" over a black scene and, after a reload, blamed a prior file load. Re-check the flag once the file has loaded and distinguish "request ignored" from "not available in this SDK".
createWorker() resolves the requested options, tries the deferred worker, falls back with a warning, and commits the options the worker was actually built with, so HybridRiveFileFactory no longer stitches those steps together and a failed construction leaves the options open for a retry. Also drops the isAccessible toggle in DeferredRiveWorker: the mangled entry point is public in bytecode.
…erred worker The docs named `RiveWorker.createDeferred()` as if it were public API and did not say that an older `RiveRuntimeIOSVersion` fails to compile. Also trims the DeferredRiveWorker comment to what the lookup does.
mfazekas
force-pushed
the
claude/gpu-canvas-beta-android-ios-7ccb40
branch
from
October 5, 2026 11:57
2ee96bb to
d46c41c
Compare
dskuza
approved these changes
Oct 5, 2026
mfazekas
pushed a commit
that referenced
this pull request
Oct 6, 2026
🤖 I have created a release *beep* *boop* --- ## [0.5.3](v0.5.2...v0.5.3) (2026-10-05) ### Features * expose GPU Canvas (3D) on iOS and Android ([#381](#381)) ([d9439a9](d9439a9)) --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please).
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.
Exposes GPU Canvas (required for 3D content) on the new runtime as
RiveRuntime.setGPUCanvasEnabled(true)/isGPUCanvasEnabled(). It needs rive-ios 6.25.0+ and rive-android 11.12.0+, whichmainalready pins (6.28.0 / 11.12.1). The setting is process-wide and must be set before the first Rive file loads; a later call logs a warning and is ignored. No-op on the legacy runtime.iOS uses
Worker(configuration: .init(enableGPUCanvas:)). Android uses rive-android's experimental deferred renderer, whoseCommandQueue.createDeferredis Kotlin-internal, soDeferredRiveWorker.ktresolves it by reflection; if the rive-android in use has no such entry point the worker is created without GPU Canvas and a warning is logged.While testing 11.12.0 this found rive-app/rive-android#470 (debug-build abort when reading a nonexistent boolean property, fixed in 11.12.1); the harness test now covers nested misses too.
Example page
demos/GPUCanvasDemo.tsxrendersore.riv(rive-android's sample, MIT). Verified on both platforms: harness green (iOS 29/29, Android 29/29), the 3D scene renders with the flag and is black without it. Docs indocs/runtime-backends.md.