⚠ Archived content — this site is no longer maintained.   Current WebKit documentation is at docs.webkit.org.

Changeset 277324 in webkit


Ignore:
Timestamp:
May 11, 2021, 7:55:53 AM (5 years ago)
Author:
commit-queue@webkit.org
Message:

[WebXR] Return a default layer handle in XRDeviceProxy::createLayerProjection
https://bugs.webkit.org/show_bug.cgi?id=225631

Patch by Ada Chan <ada.chan@apple.com> on 2021-05-11
Reviewed by Dean Jackson.

  • Shared/Cocoa/XRDeviceProxy.h:
  • Shared/Cocoa/XRDeviceProxy.mm:

(WebKit::XRDeviceProxy::createLayerProjection):

  • UIProcess/Cocoa/PlatformXRCoordinator.h:

(WebKit::PlatformXRCoordinator::defaultLayerHandle):

  • WebProcess/cocoa/PlatformXRSystemProxy.h:
  • WebProcess/cocoa/PlatformXRSystemProxy.mm:

(WebKit::PlatformXRSystemProxy::createLayerProjection):

Location:
trunk/Source/WebKit
Files:
6 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebKit/ChangeLog

    r277316 r277324  
     12021-05-11  Ada Chan  <ada.chan@apple.com>
     2
     3        [WebXR] Return a default layer handle in XRDeviceProxy::createLayerProjection
     4        https://bugs.webkit.org/show_bug.cgi?id=225631
     5
     6        Reviewed by Dean Jackson.
     7
     8        * Shared/Cocoa/XRDeviceProxy.h:
     9        * Shared/Cocoa/XRDeviceProxy.mm:
     10        (WebKit::XRDeviceProxy::createLayerProjection):
     11        * UIProcess/Cocoa/PlatformXRCoordinator.h:
     12        (WebKit::PlatformXRCoordinator::defaultLayerHandle):
     13        * WebProcess/cocoa/PlatformXRSystemProxy.h:
     14        * WebProcess/cocoa/PlatformXRSystemProxy.mm:
     15        (WebKit::PlatformXRSystemProxy::createLayerProjection):
     16
    1172021-05-10  Wenson Hsieh  <wenson_hsieh@apple.com>
    218
  • trunk/Source/WebKit/Shared/Cocoa/XRDeviceProxy.h

    r275835 r277324  
    5757    Vector<PlatformXR::Device::ViewData> views(PlatformXR::SessionMode) const final;
    5858    void requestFrame(PlatformXR::Device::RequestFrameCallback&&) final;
    59     Optional<PlatformXR::LayerHandle> createLayerProjection(uint32_t, uint32_t, bool) override { return WTF::nullopt; };
     59    Optional<PlatformXR::LayerHandle> createLayerProjection(uint32_t, uint32_t, bool) final;
    6060    void deleteLayer(PlatformXR::LayerHandle) override { };
    6161
  • trunk/Source/WebKit/Shared/Cocoa/XRDeviceProxy.mm

    r275835 r277324  
    8989}
    9090
     91Optional<PlatformXR::LayerHandle> XRDeviceProxy::createLayerProjection(uint32_t width, uint32_t height, bool alpha)
     92{
     93    return m_xrSystem ? m_xrSystem->createLayerProjection(width, height, alpha) : WTF::nullopt;
     94}
     95
    9196} // namespace WebKit
    9297
  • trunk/Source/WebKit/UIProcess/Cocoa/PlatformXRCoordinator.h

    r275835 r277324  
    4242    virtual ~PlatformXRCoordinator() = default;
    4343
     44    // FIXME: Temporary and will be fixed later.
     45    static PlatformXR::LayerHandle defaultLayerHandle() { return 1; }
     46
    4447    using DeviceInfoCallback = Function<void(Optional<XRDeviceInfo>)>;
    4548    virtual void getPrimaryDeviceInfo(DeviceInfoCallback&&) = 0;
  • trunk/Source/WebKit/WebProcess/cocoa/PlatformXRSystemProxy.h

    r275835 r277324  
    4646    void shutDownTrackingAndRendering();
    4747    void requestFrame(PlatformXR::Device::RequestFrameCallback&&);
     48    Optional<PlatformXR::LayerHandle> createLayerProjection(uint32_t, uint32_t, bool);
    4849
    4950private:
  • trunk/Source/WebKit/WebProcess/cocoa/PlatformXRSystemProxy.mm

    r275835 r277324  
    2929#if ENABLE(WEBXR)
    3030
     31#import "PlatformXRCoordinator.h"
    3132#import "PlatformXRSystemMessages.h"
    3233#import "PlatformXRSystemProxyMessages.h"
     
    8485}
    8586
     87Optional<PlatformXR::LayerHandle> PlatformXRSystemProxy::createLayerProjection(uint32_t, uint32_t, bool)
     88{
     89    return PlatformXRCoordinator::defaultLayerHandle();
     90}
     91
    8692void PlatformXRSystemProxy::sessionDidEnd(XRDeviceIdentifier deviceIdentifier)
    8793{
Note: See TracChangeset for help on using the changeset viewer.