Bug 226564

Summary: [WebXR] Supply an IOSurface in SimulatedXRDevice
Product: WebKit Reporter: Dean Jackson <dino>
Component: WebXRAssignee: Dean Jackson <dino>
Status: RESOLVED FIXED    
Severity: Normal CC: sam, webkit-bug-importer
Priority: P2 Keywords: InRadar
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
Patch sam: review+

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>