WebXR in Android & Linux
with OpenXR
WebKit Contributors Meeting 2025
28-29 October 2025
Sergio Villar Senín
svillar@igalia.com
1 / 16
W3C API for XR content in the Web
Core Spec + extension Modules (AR, hit testing, plane detection,
light estimation...)
Adopted by all major engines: Gecko (no AR, unmaintained), Blink
(most complete) and WebKit
Rendering via WebGL/WebGL2 or WebGPU
WebXR in Android & Linux with OpenXR
Igalia, WebKit Contributors Meeting 2025
2 / 16
Khronos API to interact with XR devices
Device, platform and gfx library agnostic
OpenGL(ES), Vulkan, D3D (and Metal in 1.1.x)
Implemented by OpenXR runtimes (internally they can use vendor
specific APIs/libraries)
Solves the fragmentation problem in XR world
Widely adopter by most vendors (Meta Quest, Pico, Magic Leap 2,
AndroidXR, Qualcomm, HoloLens...)
WebXR in Android & Linux with OpenXR
Igalia, WebKit Contributors Meeting 2025
3 / 16
📜WebXR in WebKit
Igalia started to implement the spec in March 2020
Added support for the WebXR Core & Test APIs
Eventually paused the investment
XR devices were Android only and WPE/GTK Linux only
OpenXR not widely adopted, vendors still using propietary SDKs
Apple took over and redesigned it (multiprocess architecture)
WebXR available in the wild in VisionOS
Igalia resumed WebXR work in GTK/WPE due to client request
(WPE for Android available)
WebXR in Android & Linux with OpenXR
Igalia, WebKit Contributors Meeting 2025
4 / 16
WebXR Rendering Pipeline
WebXR in Android & Linux with OpenXR
Igalia, WebKit Contributors Meeting 2025
5 / 16
WebXR Rendering Pipeline
1. UIProcess access XR devices and provides data to WebProcess
(poses, device features...)
2. UIProcess creates the images[^1] where content is rendered
3. UIProcess shares images with WebProcess
4. WebProcess imports them images and renders content on them
5. WebProcess signals UIProcess when the content is ready
(fences)
^1: images are OpenGL textures, Vulkan images, Android surfaces...
WebXR in Android & Linux with OpenXR
Igalia, WebKit Contributors Meeting 2025
6 / 16
Rendering Pipeline & OpenXR
OpenXR provides a swapchain that generates images
OpenGL textures (2-3) exported to WebProcess using DMABuf
(AHardwareBuffer)
EGL fences used to signal UIProcess whenever frame is ready
Currently using just 1 layer (projection layer)
Code ready to support multiple layers (WebXR layers)
WebXR in Android & Linux with OpenXR
Igalia, WebKit Contributors Meeting 2025
7 / 16
Rendering Pipeline Design
Most of code shared between Cocoa and WPE/GTK
Flexible design: different framebuffers for drawing and displaying
Required for MSAA: resolving multisampled buffers requires blit
Allows framebuffer scaling
Allows multiple layouts
Shared: one texture for both eyes (GTK/WPE, VisionOS simulator)
Layered: one texture per eye (VisionOS, OpenXR supports this too)
WebXR in Android & Linux with OpenXR
Igalia, WebKit Contributors Meeting 2025
8 / 16
Rendering Pipeline Design (II)
Images from UIProcess exported only once and cached in
WebProcess to be used alternatively on every frame
Shared layout is simpler and requires less blits
Not supported by all platforms (VisionOS)
Layered layout requires intermediate blit to single texture when
using WebGL (expensive!)
WebXR + WebGL assumes 1 texture shared by both eyes
WebXR + WebGPU natively supports 1 texture per eye
WebXR in Android & Linux with OpenXR
Igalia, WebKit Contributors Meeting 2025
9 / 16
Rendering Pipeline & Android
DMABuf cannot be used to share images between processes
🤖Android Hardware Buffer is the (native) way to go
⚠️AHB allocates its own resources. Cannot use OpenXR images
directly
Extra blit from AHB -> OpenXR image required before sending
content to XR compositor
WebXR in Android & Linux with OpenXR
Igalia, WebKit Contributors Meeting 2025
10 / 16
Supported specs GTK&WPE
WebXR Device API
WebXR Test API
WebXR AR Module
WebXR Hand Input Module
WebXR in Android & Linux with OpenXR
Igalia, WebKit Contributors Meeting 2025
11 / 16
Demo 🎉
0:00 / 0:22
WebXR in Android & Linux with OpenXR
Igalia, WebKit Contributors Meeting 2025
12 / 16
Further Improvements
🚊Use Vulkan as a transport mechanism
💨Fast path for non MSAA case
⏱️Instrumentation
WebXR in Android & Linux with OpenXR
Igalia, WebKit Contributors Meeting 2025
13 / 16
What's Next for 2026
WebXR Layers (initially without WebGPU bindings)
WebXR Hit Testing (useful for <model-viewer>)
WebXR Anchors
WebXR in Android & Linux with OpenXR
Igalia, WebKit Contributors Meeting 2025
14 / 16
Questions
WebXR in Android & Linux with OpenXR
Igalia, WebKit Contributors Meeting 2025
15 / 16
16 / 16

WebXR in Android and Linux with OpenXR

  • 1.
    WebXR in Android& Linux with OpenXR WebKit Contributors Meeting 2025 28-29 October 2025 Sergio Villar Senín svillar@igalia.com 1 / 16
  • 2.
    W3C API forXR content in the Web Core Spec + extension Modules (AR, hit testing, plane detection, light estimation...) Adopted by all major engines: Gecko (no AR, unmaintained), Blink (most complete) and WebKit Rendering via WebGL/WebGL2 or WebGPU WebXR in Android & Linux with OpenXR Igalia, WebKit Contributors Meeting 2025 2 / 16
  • 3.
    Khronos API tointeract with XR devices Device, platform and gfx library agnostic OpenGL(ES), Vulkan, D3D (and Metal in 1.1.x) Implemented by OpenXR runtimes (internally they can use vendor specific APIs/libraries) Solves the fragmentation problem in XR world Widely adopter by most vendors (Meta Quest, Pico, Magic Leap 2, AndroidXR, Qualcomm, HoloLens...) WebXR in Android & Linux with OpenXR Igalia, WebKit Contributors Meeting 2025 3 / 16
  • 4.
    📜WebXR in WebKit Igaliastarted to implement the spec in March 2020 Added support for the WebXR Core & Test APIs Eventually paused the investment XR devices were Android only and WPE/GTK Linux only OpenXR not widely adopted, vendors still using propietary SDKs Apple took over and redesigned it (multiprocess architecture) WebXR available in the wild in VisionOS Igalia resumed WebXR work in GTK/WPE due to client request (WPE for Android available) WebXR in Android & Linux with OpenXR Igalia, WebKit Contributors Meeting 2025 4 / 16
  • 5.
    WebXR Rendering Pipeline WebXRin Android & Linux with OpenXR Igalia, WebKit Contributors Meeting 2025 5 / 16
  • 6.
    WebXR Rendering Pipeline 1.UIProcess access XR devices and provides data to WebProcess (poses, device features...) 2. UIProcess creates the images[^1] where content is rendered 3. UIProcess shares images with WebProcess 4. WebProcess imports them images and renders content on them 5. WebProcess signals UIProcess when the content is ready (fences) ^1: images are OpenGL textures, Vulkan images, Android surfaces... WebXR in Android & Linux with OpenXR Igalia, WebKit Contributors Meeting 2025 6 / 16
  • 7.
    Rendering Pipeline &OpenXR OpenXR provides a swapchain that generates images OpenGL textures (2-3) exported to WebProcess using DMABuf (AHardwareBuffer) EGL fences used to signal UIProcess whenever frame is ready Currently using just 1 layer (projection layer) Code ready to support multiple layers (WebXR layers) WebXR in Android & Linux with OpenXR Igalia, WebKit Contributors Meeting 2025 7 / 16
  • 8.
    Rendering Pipeline Design Mostof code shared between Cocoa and WPE/GTK Flexible design: different framebuffers for drawing and displaying Required for MSAA: resolving multisampled buffers requires blit Allows framebuffer scaling Allows multiple layouts Shared: one texture for both eyes (GTK/WPE, VisionOS simulator) Layered: one texture per eye (VisionOS, OpenXR supports this too) WebXR in Android & Linux with OpenXR Igalia, WebKit Contributors Meeting 2025 8 / 16
  • 9.
    Rendering Pipeline Design(II) Images from UIProcess exported only once and cached in WebProcess to be used alternatively on every frame Shared layout is simpler and requires less blits Not supported by all platforms (VisionOS) Layered layout requires intermediate blit to single texture when using WebGL (expensive!) WebXR + WebGL assumes 1 texture shared by both eyes WebXR + WebGPU natively supports 1 texture per eye WebXR in Android & Linux with OpenXR Igalia, WebKit Contributors Meeting 2025 9 / 16
  • 10.
    Rendering Pipeline &Android DMABuf cannot be used to share images between processes 🤖Android Hardware Buffer is the (native) way to go ⚠️AHB allocates its own resources. Cannot use OpenXR images directly Extra blit from AHB -> OpenXR image required before sending content to XR compositor WebXR in Android & Linux with OpenXR Igalia, WebKit Contributors Meeting 2025 10 / 16
  • 11.
    Supported specs GTK&WPE WebXRDevice API WebXR Test API WebXR AR Module WebXR Hand Input Module WebXR in Android & Linux with OpenXR Igalia, WebKit Contributors Meeting 2025 11 / 16
  • 12.
    Demo 🎉 0:00 /0:22 WebXR in Android & Linux with OpenXR Igalia, WebKit Contributors Meeting 2025 12 / 16
  • 13.
    Further Improvements 🚊Use Vulkanas a transport mechanism 💨Fast path for non MSAA case ⏱️Instrumentation WebXR in Android & Linux with OpenXR Igalia, WebKit Contributors Meeting 2025 13 / 16
  • 14.
    What's Next for2026 WebXR Layers (initially without WebGPU bindings) WebXR Hit Testing (useful for <model-viewer>) WebXR Anchors WebXR in Android & Linux with OpenXR Igalia, WebKit Contributors Meeting 2025 14 / 16
  • 15.
    Questions WebXR in Android& Linux with OpenXR Igalia, WebKit Contributors Meeting 2025 15 / 16
  • 16.