Changeset 277413 in webkit


Ignore:
Timestamp:
May 12, 2021, 5:21:32 PM (4 years ago)
Author:
commit-queue@webkit.org
Message:

[WebXR] Implement XRDeviceProxy::submitFrame
https://bugs.webkit.org/show_bug.cgi?id=225718

Patch by Ada Chan <ada.chan@apple.com> on 2021-05-12
Reviewed by Sam Weinig.

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

(WebKit::XRDeviceProxy::submitFrame):

  • UIProcess/Cocoa/PlatformXRCoordinator.h:

(WebKit::PlatformXRCoordinator::submitFrame):

  • UIProcess/Cocoa/PlatformXRSystem.h:
  • UIProcess/Cocoa/PlatformXRSystem.messages.in:
  • UIProcess/Cocoa/PlatformXRSystem.mm:

(WebKit::PlatformXRSystem::submitFrame):

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

(WebKit::PlatformXRSystemProxy::submitFrame):

Location:
trunk/Source/WebKit
Files:
9 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebKit/ChangeLog

    r277400 r277413  
     12021-05-12  Ada Chan  <ada.chan@apple.com>
     2
     3        [WebXR] Implement XRDeviceProxy::submitFrame
     4        https://bugs.webkit.org/show_bug.cgi?id=225718
     5
     6        Reviewed by Sam Weinig.
     7
     8        * Shared/Cocoa/XRDeviceProxy.h:
     9        * Shared/Cocoa/XRDeviceProxy.mm:
     10        (WebKit::XRDeviceProxy::submitFrame):
     11        * UIProcess/Cocoa/PlatformXRCoordinator.h:
     12        (WebKit::PlatformXRCoordinator::submitFrame):
     13        * UIProcess/Cocoa/PlatformXRSystem.h:
     14        * UIProcess/Cocoa/PlatformXRSystem.messages.in:
     15        * UIProcess/Cocoa/PlatformXRSystem.mm:
     16        (WebKit::PlatformXRSystem::submitFrame):
     17        * WebProcess/cocoa/PlatformXRSystemProxy.h:
     18        * WebProcess/cocoa/PlatformXRSystemProxy.mm:
     19        (WebKit::PlatformXRSystemProxy::submitFrame):
     20
    1212021-05-12  Brent Fulgham  <bfulgham@apple.com>
    222
  • trunk/Source/WebKit/Shared/Cocoa/XRDeviceProxy.h

    r277324 r277413  
    5959    Optional<PlatformXR::LayerHandle> createLayerProjection(uint32_t, uint32_t, bool) final;
    6060    void deleteLayer(PlatformXR::LayerHandle) override { };
     61    void submitFrame(Vector<PlatformXR::Device::Layer>&&) final;
    6162
    6263    XRDeviceIdentifier m_identifier;
  • trunk/Source/WebKit/Shared/Cocoa/XRDeviceProxy.mm

    r277324 r277413  
    9494}
    9595
     96void XRDeviceProxy::submitFrame(Vector<PlatformXR::Device::Layer>&&)
     97{
     98    if (m_xrSystem)
     99        m_xrSystem->submitFrame();
     100}
     101
    96102} // namespace WebKit
    97103
  • trunk/Source/WebKit/UIProcess/Cocoa/PlatformXRCoordinator.h

    r277324 r277413  
    5555    // Session display loop.
    5656    virtual void scheduleAnimationFrame(WebPageProxy&, PlatformXR::Device::RequestFrameCallback&&) = 0;
     57    virtual void submitFrame(WebPageProxy&) { }
    5758};
    5859
  • trunk/Source/WebKit/UIProcess/Cocoa/PlatformXRSystem.h

    r275835 r277413  
    5757    void shutDownTrackingAndRendering();
    5858    void requestFrame(CompletionHandler<void(PlatformXR::Device::FrameData&&)>&&);
     59    void submitFrame();
    5960
    6061    WebPageProxy& m_page;
  • trunk/Source/WebKit/UIProcess/Cocoa/PlatformXRSystem.messages.in

    r275835 r277413  
    3131    ShutDownTrackingAndRendering()
    3232    RequestFrame() -> (struct PlatformXR::Device::FrameData frameData) Async
     33    SubmitFrame()
    3334}
    3435
  • trunk/Source/WebKit/UIProcess/Cocoa/PlatformXRSystem.mm

    r275929 r277413  
    100100}
    101101
     102void PlatformXRSystem::submitFrame()
     103{
     104    if (auto* xrCoordinator = PlatformXRSystem::xrCoordinator())
     105        xrCoordinator->submitFrame(m_page);
     106}
     107
    102108}
    103109
  • trunk/Source/WebKit/WebProcess/cocoa/PlatformXRSystemProxy.h

    r277324 r277413  
    4747    void requestFrame(PlatformXR::Device::RequestFrameCallback&&);
    4848    Optional<PlatformXR::LayerHandle> createLayerProjection(uint32_t, uint32_t, bool);
     49    void submitFrame();
    4950
    5051private:
  • trunk/Source/WebKit/WebProcess/cocoa/PlatformXRSystemProxy.mm

    r277324 r277413  
    9090}
    9191
     92void PlatformXRSystemProxy::submitFrame()
     93{
     94    m_page.send(Messages::PlatformXRSystem::SubmitFrame());
     95}
     96
    9297void PlatformXRSystemProxy::sessionDidEnd(XRDeviceIdentifier deviceIdentifier)
    9398{
Note: See TracChangeset for help on using the changeset viewer.