Repository navigation
fix(android): fall back with a warning when GPU Canvas is unavailable - #383
Merged
mfazekas merged 1 commit intoSep 22, 2026
Conversation
…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.
mfazekas
added this pull request to stack #384
September 22, 2026 08:23
Collaborator
Author
|
Folded into #381 (its branch now includes this commit) so the feature is reviewed once with the fallback in place. |
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.
Stacked on #381. The GPU Canvas worker on Android was reached through a Java shim that named rive-android's Kotlin-internal
createDeferred$kotlin_releaseat compile time, so any rive-android without that exact symbol (an olderRive_RiveRuntimeAndroidVersionoverride, or an upstream rename) failed the build.DeferredRiveWorkernow looks the method up by reflection, accepting the mangled name or a plaincreateDeferred(so it keeps working if upstream makes it public). When it is missing, the shared worker is created without GPU Canvas, a warning goes throughRiveLog, andRiveRuntime.isGPUCanvasEnabled()reportsfalsefrom then on. A real worker-init failure still throws.Verified on the Pixel 6 emulator with the
ore.rivdemo: on 11.12.1 the 3D scene renders as before; on 11.11.0 (no deferred worker, previously a compile error) the app builds, logs the warning and runs without GPU Canvas.