Bug 226564 - [WebXR] Supply an IOSurface in SimulatedXRDevice
Summary: [WebXR] Supply an IOSurface in SimulatedXRDevice
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebXR (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Dean Jackson
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2021-06-02 18:34 PDT by Dean Jackson
Modified: 2021-06-05 16:32 PDT (History)
2 users (show)

See Also:


Attachments
Patch (2.75 KB, patch)
2021-06-02 18:36 PDT, Dean Jackson
sam: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Dean Jackson 2021-06-02 18:34:50 PDT
Supply an IOSurface in SimulatedXRDevice
Comment 1 Radar WebKit Bug Importer 2021-06-02 18:35:02 PDT
<rdar://problem/78793086>
Comment 2 Dean Jackson 2021-06-02 18:36:57 PDT
Created attachment 430431 [details]
Patch
Comment 3 Sam Weinig 2021-06-03 08:10:41 PDT
Comment on attachment 430431 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=430431&action=review

> Source/WebCore/Modules/webxr/WebXROpaqueFramebuffer.cpp:119
> +    ASSERT(data.surface);

Maybe consider making surface a UniqueRef?

> Source/WebCore/testing/WebFakeXRDevice.cpp:154
> +        auto surface = IOSurface::create(recommendedResolution(PlatformXR::SessionMode::ImmersiveVr), DestinationColorSpace::SRGB());
> +        data.layers.add(layer.key, FrameData::LayerData { .surface = WTFMove(surface) });

I would do this in one line.
Comment 4 Dean Jackson 2021-06-05 16:32:23 PDT
Committed r278528 (238527@main): <https://commits.webkit.org/238527@main>