Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: e8cad83439f7810c724aa5e9c91a4c193b2b0548
https://github.com/WebKit/WebKit/commit/e8cad83439f7810c724aa5e9c91a4c193b2b0548
Author: Youenn Fablet <[email protected]>
Date: 2023-01-08 (Sun, 08 Jan 2023)
Changed paths:
M Source/WebCore/WebCore.xcodeproj/project.pbxproj
M Source/WebCore/html/canvas/WebGLRenderingContextBase.cpp
M Source/WebCore/platform/graphics/GraphicsContextGL.cpp
M Source/WebCore/platform/graphics/GraphicsContextGL.h
M Source/WebCore/platform/graphics/cv/GraphicsContextGLCVCocoa.cpp
M Source/WebCore/platform/graphics/cv/GraphicsContextGLCVCocoa.h
A Source/WebCore/platform/graphics/cv/GraphicsContextGLCVCocoa.mm
M Source/WebKit/GPUProcess/graphics/RemoteGraphicsContextGL.cpp
M Source/WebKit/GPUProcess/graphics/RemoteGraphicsContextGL.h
M Source/WebKit/GPUProcess/graphics/RemoteGraphicsContextGL.messages.in
M Source/WebKit/GPUProcess/graphics/RemoteGraphicsContextGLCocoa.cpp
M Source/WebKit/WebProcess/GPU/graphics/RemoteGraphicsContextGLProxy.cpp
M Source/WebKit/WebProcess/GPU/graphics/RemoteGraphicsContextGLProxy.h
M
Source/WebKit/WebProcess/GPU/graphics/cocoa/RemoteGraphicsContextGLProxyCocoa.mm
M
Source/WebKit/WebProcess/GPU/graphics/wc/RemoteGraphicsContextGLProxyWC.cpp
M Source/WebKit/WebProcess/WebCoreSupport/WebChromeClient.cpp
M Source/WebKit/WebProcess/WebCoreSupport/WebWorkerClient.cpp
M Source/WebKit/WebProcess/WebCoreSupport/WebWorkerClient.h
Log Message:
-----------
Add support for texImage2D and texSubImage2D of WebCodecs VideoFrame when
remote layer tree is enabled
https://bugs.webkit.org/show_bug.cgi?id=250022
rdar://problem/103832398
Reviewed by Eric Carlson.
In-process texture creation of a VideoFrame in a canvas is based on
VideoFrame::paintInContext using a PixelBufferConformerCV.
This does not work in WebProcess once sandbox is tigthened/using remote
rendering tree.
To fix this, we go to GPUProcess to either create the texture when possible
(fast code path) via RemoteGraphicsContextGLProxy::copyTextureFromVideoFrame,
or to RemoteGraphicsContextGLProxy::videoFrameToImage via
RemoteVideoFrameObjectHeapProxyProcessor::getNativeImage to create a
NativeImage..
Covered by
imported/w3c/web-platform-tests/webcodecs/videoFrame-texImage.any.html and
imported/w3c/web-platform-tests/webcodecs/videoFrame-texImage.any.worker.html.
* Source/WebCore/WebCore.xcodeproj/project.pbxproj:
* Source/WebCore/html/canvas/WebGLRenderingContextBase.cpp:
(WebCore::WebGLRenderingContextBase::texImageSourceHelper):
* Source/WebCore/platform/graphics/GraphicsContextGL.cpp:
(WebCore::GraphicsContextGL::videoFrameToImage):
* Source/WebCore/platform/graphics/GraphicsContextGL.h:
(WebCore::GraphicsContextGL::copyTextureFromVideoFrame):
* Source/WebCore/platform/graphics/cv/GraphicsContextGLCVCocoa.cpp:
(WebCore::GraphicsContextGLCVCocoa::copyVideoSampleToTexture):
* Source/WebCore/platform/graphics/cv/GraphicsContextGLCVCocoa.h:
* Source/WebCore/platform/graphics/cv/GraphicsContextGLCVCocoa.mm: Added.
(WebCore::GraphicsContextGLCVCocoa::convertPixelBuffer):
* Source/WebKit/GPUProcess/graphics/RemoteGraphicsContextGL.cpp:
(WebKit::RemoteGraphicsContextGL::RemoteGraphicsContextGL):
(WebKit::RemoteGraphicsContextGL::copyTextureFromVideoFrame):
(WebKit::RemoteGraphicsContextGL::setSharedVideoFrameSemaphore):
(WebKit::RemoteGraphicsContextGL::setSharedVideoFrameMemory):
* Source/WebKit/GPUProcess/graphics/RemoteGraphicsContextGL.h:
* Source/WebKit/GPUProcess/graphics/RemoteGraphicsContextGL.messages.in:
* Source/WebKit/GPUProcess/graphics/RemoteGraphicsContextGLCocoa.cpp:
(WebKit::RemoteGraphicsContextGL::copyTextureFromVideoFrame):
* Source/WebKit/WebProcess/GPU/graphics/RemoteGraphicsContextGLProxy.cpp:
(WebKit::RemoteGraphicsContextGLProxy::RemoteGraphicsContextGLProxy):
(WebKit::RemoteGraphicsContextGLProxy::copyTextureFromMedia):
(WebKit::RemoteGraphicsContextGLProxy::copyTextureFromVideoFrame):
(WebKit::RemoteGraphicsContextGLProxy::videoFrameToImage):
(WebKit::RemoteGraphicsContextGLProxy::disconnectGpuProcessIfNeeded):
* Source/WebKit/WebProcess/GPU/graphics/RemoteGraphicsContextGLProxy.h:
*
Source/WebKit/WebProcess/GPU/graphics/cocoa/RemoteGraphicsContextGLProxyCocoa.mm:
(WebKit::RemoteGraphicsContextGLProxy::create):
* Source/WebKit/WebProcess/WebCoreSupport/WebChromeClient.cpp:
(WebKit::WebChromeClient::createGraphicsContextGL const):
* Source/WebKit/WebProcess/WebCoreSupport/WebWorkerClient.cpp:
(WebKit::WebWorkerClient::WebWorkerClient):
(WebKit::WebWorkerClient::clone):
(WebKit::WebWorkerClient::createGraphicsContextGL const):
* Source/WebKit/WebProcess/WebCoreSupport/WebWorkerClient.h:
Canonical link: https://commits.webkit.org/258650@main
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes