[webkit-changes] [WebKit/WebKit] d41c61: [WebXR] Use MTLTexture to attach color IOSurface
Dan Glastonbury
noreply at github.com
Wed Jun 28 17:34:57 PDT 2023
Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: d41c610090b07554b2266f6d56435c8612c987b4
https://github.com/WebKit/WebKit/commit/d41c610090b07554b2266f6d56435c8612c987b4
Author: Dan Glastonbury <djg at apple.com>
Date: 2023-06-28 (Wed, 28 Jun 2023)
Changed paths:
M Source/WebCore/Modules/webxr/WebXROpaqueFramebuffer.cpp
M Source/WebCore/Modules/webxr/WebXROpaqueFramebuffer.h
M Source/WebCore/platform/graphics/cocoa/GraphicsContextGLCocoa.h
M Source/WebCore/platform/graphics/cocoa/GraphicsContextGLCocoa.mm
M Source/WebCore/platform/xr/PlatformXR.h
M Source/WebCore/testing/WebFakeXRDevice.cpp
Log Message:
-----------
[WebXR] Use MTLTexture to attach color IOSurface
https://bugs.webkit.org/show_bug.cgi?id=258598
rdar://problem/111426880
Reviewed by Kimmo Kinnunen.
There are two paths in WebXROpaqueFramebuffer for attaching compositor provided
IOSurface for rendering: 1) Via MTLSharedTexture, and 2) Via pbuffer.
Since it's possible to create a MTLTexture from an IOSurface and plane index,
switch away from using pbuffer to reduce the number of code paths.
This patch introduces USE(MTLTEXTURE_FOR_XR_LAYER_DATA) to aid the transition of
platform specific WebXR systems. Once those systems are updated,
USE(IOSURFACE_FOR_XR_LAYER_DATA) will be removed.
* Source/WebCore/Modules/webxr/WebXROpaqueFramebuffer.cpp:
(WebCore::WebXROpaqueFramebuffer::startFrame):
(WebCore::WebXROpaqueFramebuffer::endFrame):
(WebCore::WebXROpaqueFramebuffer::allocateColorStorage):
* Source/WebCore/Modules/webxr/WebXROpaqueFramebuffer.h:
* Source/WebCore/platform/graphics/cocoa/GraphicsContextGLCocoa.h:
* Source/WebCore/platform/graphics/cocoa/GraphicsContextGLCocoa.mm:
(WebCore::GraphicsContextGLCocoa::platformInitialize):
(WebCore::GraphicsContextGLCocoa::createAndBindEGLImage):
(WebCore::createAndBindSharedTextureToExternalImage): Deleted.
* Source/WebCore/platform/xr/PlatformXR.h:
(PlatformXR::Device::FrameData::LayerData::encode const):
(PlatformXR::Device::FrameData::LayerData::decode):
* Source/WebCore/testing/WebFakeXRDevice.cpp:
(WebCore::SimulatedXRDevice::frameTimerFired):
Canonical link: https://commits.webkit.org/265606@main
More information about the webkit-changes
mailing list