Skip to content

Commit

Permalink
[WebXR] Fix MachSendRight build failures after 266327@main
Browse files Browse the repository at this point in the history
https://bugs.webkit.org/show_bug.cgi?id=259585
rdar://113008655

Unreviewed build fix.

After 266327@main, MachSendRight() need to be moved instead of copied.

* Source/WebCore/Modules/webxr/WebXROpaqueFramebuffer.cpp:
(WebCore::WebXROpaqueFramebuffer::startFrame):
* Source/WebCore/platform/xr/PlatformXR.h:
(PlatformXR::Device::FrameData::LayerData::encode const):

Canonical link: https://commits.webkit.org/266375@main
  • Loading branch information
djg committed Jul 28, 2023
1 parent 50287ce commit 2fe6aa9
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion Source/WebCore/Modules/webxr/WebXROpaqueFramebuffer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,7 @@ void WebXROpaqueFramebuffer::startFrame(const PlatformXR::Device::FrameData::Lay
#if USE(IOSURFACE_FOR_XR_LAYER_DATA)
// FIXME: This is temporary until Cocoa-specific platforms migrate to MTLTEXTURE_FOR_XR_LAYER_DATA.
auto colorTextureSource = makeEGLImageSource({ data.surface->createSendRight(), false });
auto depthStencilBufferSource = makeEGLImageSource({ { }, false });
auto depthStencilBufferSource = makeEGLImageSource({ MachSendRight(), false });
#elif USE(MTLTEXTURE_FOR_XR_LAYER_DATA)
auto colorTextureSource = makeEGLImageSource(data.colorTexture);
auto depthStencilBufferSource = makeEGLImageSource(data.depthStencilBuffer);
Expand Down
2 changes: 1 addition & 1 deletion Source/WebCore/platform/xr/PlatformXR.h
Original file line number Diff line number Diff line change
Expand Up @@ -582,7 +582,7 @@ void Device::FrameData::LayerData::encode(Encoder& encoder) const
{
#if USE(IOSURFACE_FOR_XR_LAYER_DATA)
MachSendRight surfaceSendRight = surface ? surface->createSendRight() : MachSendRight();
encoder << surfaceSendRight;
encoder << WTFMove(surfaceSendRight);
encoder << isShared;
#elif USE(MTLTEXTURE_FOR_XR_LAYER_DATA)
encoder << std::make_tuple(MachSendRight(std::get<0>(colorTexture)), std::get<1>(colorTexture));
Expand Down

0 comments on commit 2fe6aa9

Please sign in to comment.