[webkit-changes] [WebKit/WebKit] 281800: Painting an in-process VideoFrame in a remotely-ba...
youennf
noreply at github.com
Thu Jan 5 01:37:21 PST 2023
Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: 2818008f7934a4e77dea44d03713df75892c7bd3
https://github.com/WebKit/WebKit/commit/2818008f7934a4e77dea44d03713df75892c7bd3
Author: Youenn Fablet <youennf at gmail.com>
Date: 2023-01-05 (Thu, 05 Jan 2023)
Changed paths:
M Source/WebCore/platform/cocoa/SharedVideoFrameInfo.mm
M Source/WebCore/platform/graphics/GraphicsContext.cpp
M Source/WebCore/platform/graphics/GraphicsContext.h
M Source/WebCore/platform/graphics/displaylists/DisplayListRecorder.cpp
M Source/WebCore/platform/graphics/displaylists/DisplayListRecorder.h
M Source/WebCore/platform/graphics/displaylists/DisplayListRecorderImpl.cpp
M Source/WebCore/platform/graphics/displaylists/DisplayListRecorderImpl.h
M Source/WebKit/GPUProcess/graphics/RemoteDisplayListRecorder.cpp
M Source/WebKit/GPUProcess/graphics/RemoteDisplayListRecorder.h
M Source/WebKit/GPUProcess/graphics/RemoteDisplayListRecorder.messages.in
M Source/WebKit/GPUProcess/graphics/RemoteRenderingBackend.h
M Source/WebKit/WebProcess/GPU/graphics/RemoteDisplayListRecorderProxy.cpp
M Source/WebKit/WebProcess/GPU/graphics/RemoteDisplayListRecorderProxy.h
M Source/WebKit/WebProcess/GPU/webrtc/SharedVideoFrame.cpp
M Source/WebKit/WebProcess/GPU/webrtc/SharedVideoFrame.h
Log Message:
-----------
Painting an in-process VideoFrame in a remotely-backed canvas does not work
https://bugs.webkit.org/show_bug.cgi?id=250002
rdar://problem/103812253
Reviewed by Eric Carlson.
In-process rendering 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 reuse the existing RemoteDisplayListRecorder infrastructure.
We use a SharedVideoFrameWriter/SharedVideoFrameReader in RemoteDisplayListRecorderProxy/RemoteDisplayListRecorder.
We enable ARGB since VideoFrameCV uses this type.
Covered by WPT webcodecs tests with remote rendering tree enabled.
* Source/WebCore/platform/graphics/BifurcatedGraphicsContext.cpp:
(WebCore::BifurcatedGraphicsContext::drawNativeImage):
* Source/WebCore/platform/graphics/cg/GraphicsContextCG.cpp:
(WebCore::GraphicsContextCG::drawNativeImage):
* Source/WebCore/platform/graphics/displaylists/DisplayListRecorder.cpp:
(WebCore::DisplayList::Recorder::drawNativeImage):
(WebCore::DisplayList::Recorder::paintVideoFrame):
* Source/WebCore/platform/graphics/displaylists/DisplayListRecorder.h:
* Source/WebCore/platform/graphics/displaylists/DisplayListRecorderImpl.cpp:
(WebCore::DisplayList::RecorderImpl::recordPaintFrameForMedia):
(WebCore::DisplayList::RecorderImpl::recordPaintVideoFrame):
* Source/WebCore/platform/graphics/displaylists/DisplayListRecorderImpl.h:
* Source/WebKit/GPUProcess/graphics/RemoteDisplayListRecorder.cpp:
(WebKit::RemoteDisplayListRecorder::drawNativeImage):
(WebKit::RemoteDisplayListRecorder::paintVideoFrame):
(WebKit::RemoteDisplayListRecorder::setSharedVideoFrameSemaphore):
(WebKit::RemoteDisplayListRecorder::setSharedVideoFrameMemory):
* Source/WebKit/GPUProcess/graphics/RemoteDisplayListRecorder.h:
* Source/WebKit/GPUProcess/graphics/RemoteDisplayListRecorder.messages.in:
* Source/WebKit/WebProcess/GPU/graphics/RemoteDisplayListRecorderProxy.cpp:
(WebKit::RemoteDisplayListRecorderProxy::recordPaintVideoFrame):
(WebKit::RemoteDisplayListRecorderProxy::disconnect):
* Source/WebKit/WebProcess/GPU/graphics/RemoteDisplayListRecorderProxy.h:
* Source/WebKit/WebProcess/GPU/webrtc/SharedVideoFrame.cpp:
* Source/WebKit/WebProcess/GPU/webrtc/SharedVideoFrame.h:
Canonical link: https://commits.webkit.org/258479@main
More information about the webkit-changes
mailing list