Skip to content

fix(🤖): new WebGPUHardwareBufferView - #482

Merged
wcandillon merged 13 commits into
mainfrom
exp
Sep 20, 2026
Merged

wcandillon merged 13 commits into
mainfrom
exp

Conversation

@wcandillon

Copy link
Copy Markdown
Owner

No description provided.

wcandillon and others added 13 commits June 29, 2026 17:08
…tched surface lifecycle

Re-applies the AHardwareBuffer pool backend on top of main's SurfaceInfo
refactor (latched attach, detach(), registry ownership split) and wires
WebGPUHardwareBufferView into the opaque / android.surfaceType props:
auto + non-opaque picks it on API 29+, and "HardwareBufferView" can be
requested explicitly. Drops main's unreferenced ImageReader WebGPUAHBView.
Adapts GetProperties() to the Dawn chrome-m154 Status return.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
… memory

The Android example build was failing in :app:packageDebug with
java.lang.OutOfMemoryError: Java heap space. The earlier attempt (#481)
raised JAVA_OPTS, but that only sizes the gradlew client JVM. packageDebug
runs inside the Gradle daemon, which was still capped at 2g by
org.gradle.jvmargs while packaging ~600MB of native libraries across four
ABIs. Set the daemon heap to 8g in gradle.properties and drop the
ineffective JAVA_OPTS override.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
…TextureView fallback

- Cube requests android.surfaceType "HardwareBufferView" explicitly.
- TransparencyMode gains a "hardware buffer" option so it can be compared
  with TextureView on the same scene, and its comments reflect the new
  non-opaque default on Android 10+.
- RenderAfterUnmount pins TextureView so it keeps exercising the
  SurfaceTexture teardown path it was written for.
- The Canvas API page shows how to request HardwareBufferView and how to
  pin TextureView as a safety fallback.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Restructure the Android rendering options section around SurfaceView,
TextureView and HardwareBufferView: what each one is, how it composites,
that HardwareBufferView needs API 29+ and is designed to have lower
latency than TextureView, a comparison table, and when to pick one
explicitly. Point the getting-started page at it.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
A non-opaque canvas defaults to TextureView again; HardwareBufferView is
selected only through android.surfaceType. It stays opt-in until it falls
back to TextureView at runtime when the AHardwareBuffer allocation or
import fails on a device (today the canvas silently renders offscreen)
and its latency advantage over TextureView is measured.

Docs, the Canvas prop comments, the design doc and the example comments
describe the three Android backing views with this default.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
@wcandillon
wcandillon merged commit e0960d1 into main Sep 20, 2026
2 checks passed
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