[webkit-changes] [WebKit/WebKit] bdfa9e: [WebXR] Display WebGL content over camera feed

Dan Glastonbury noreply at github.com
Tue Nov 7 17:40:40 PST 2023


  Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: bdfa9ed9f0f101f60a166ad8ce90ae1fa4656d80
      https://github.com/WebKit/WebKit/commit/bdfa9ed9f0f101f60a166ad8ce90ae1fa4656d80
  Author: Dan Glastonbury <djg at apple.com>
  Date:   2023-11-07 (Tue, 07 Nov 2023)

  Changed paths:
    M Source/WebKit/UIProcess/XR/ios/PlatformXRARKit.mm
    M Source/WebKit/UIProcess/XR/ios/WKARPresentationSession.h
    M Source/WebKit/UIProcess/XR/ios/WKARPresentationSession.mm

  Log Message:
  -----------
  [WebXR] Display WebGL content over camera feed
https://bugs.webkit.org/show_bug.cgi?id=262774
rdar://116502727

Reviewed by Dean Jackson.

WebGL content compositing is implemented by creating a CAMetalLayer sublayer
positioned on top of the CALayer containing the captured camera
image. MTLSharedTexture and MTLSharedEvents are passed via MachSendRight to
WebXROpaqueFramebuffer, which passes those objects to the process that handles
WebGL rendering. Presentation of the WebGL content and associated camera images
is fenced on the signalling of the MTLSharedEvent passed to WebGL.

* Source/WebKit/UIProcess/XR/ios/PlatformXRARKit.mm:
(WebKit::makeMachSendRight):
(WebKit::ARKitCoordinator::submitFrame):
(WebKit::ARKitCoordinator::renderLoop):
* Source/WebKit/UIProcess/XR/ios/WKARPresentationSession.h:
* Source/WebKit/UIProcess/XR/ios/WKARPresentationSession.mm:
(-[WKARPresentationSessionDescriptor init]):
(-[WKARPresentationSessionDescriptor copyWithZone:]):
(-[_WKARPresentationSession initWithSession:descriptor:]):
(-[_WKARPresentationSession completionEvent]):
(-[_WKARPresentationSession colorTexture]):
(-[_WKARPresentationSession startFrame]):
(-[_WKARPresentationSession present]):
(-[_WKARPresentationSession viewDidLoad]):
(-[_WKARPresentationSession _loadMetal]):

Canonical link: https://commits.webkit.org/270362@main




More information about the webkit-changes mailing list