Skip to content

Architecture A spike: in-app Android compositor (real XR_DXR_android_surface_binding, async main-thread DP creation, host classloader, AAR <queries><intent>) #1037

Description

@dfattal

Part of #1031 · ADR-036 D2. The spike that turns Architecture A from "feasible" into "shipping".

Architecture A puts the compositor + vendor DP + one vendor core in the app process — the
Windows shape and the Khronos Android loader's native shape. Its blockers are packaging, not
rendering:

  1. XR_DXR_android_surface_binding for real — the app passes its own Surface/ANativeWindow;
    retire the runtime-spawned SurfaceView (oxr_session_gfx_vk_native.c:274-300, the
    "single-app POC") and keep it only as the _hosted fallback. No spec file exists yet.
  2. Async main-thread DP creation — CNSDK needs the main Looper pumping (LeiaSDK.java:376),
    so DP creation marshals onto the app main thread via aux_android/android_main_thread and
    must be non-blocking when xrCreateSession itself runs on the main thread; the session
    reports XR_SESSION_STATE_READY once the DP is up.
  3. Plug-in-loader host classloadertarget_plugin_loader.c's Android branch exposes a
    runtime-APK Context/classloader to plug-ins (mirroring loadClassFromRuntimeApk,
    ipc_client_android.cpp:54-58) so vendor Java glue resolves without the app bundling it.
  4. displayxr AAR manifest carries the single
    <queries><intent><action android:name="org.displayxr.action.VENDOR_DISPLAY_SERVICE"/></intent></queries>
    (+ the OpenXR broker provider). Depends on the vendor intent-filter ask (L7) in the vendor
    tracker issue.
    Also audit comp_vk_native for per-process statics of the
    comp_d3d11_target.cpp kind.

Done-when: one cube fully in-process with the vendor DP, then two apps concurrently; measure the
hop saved vs PoC-0.

Metadata

Metadata

Assignees

No one assigned

    Labels

    androidAndroid platformarchitectureArchitectural design and structural changesdesign-neededNeeds design discussion before implementation

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions