Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: c4d2f15c75962c6171446e2328d3a80eccda23b0
https://github.com/WebKit/WebKit/commit/c4d2f15c75962c6171446e2328d3a80eccda23b0
Author: Kimmo Kinnunen <[email protected]>
Date: 2025-12-19 (Fri, 19 Dec 2025)
Changed paths:
M Source/WebCore/platform/VideoFrame.cpp
M Source/WebCore/platform/VideoFrame.h
M Source/WebCore/platform/graphics/BifurcatedGraphicsContext.cpp
M Source/WebCore/platform/graphics/BifurcatedGraphicsContext.h
M Source/WebCore/platform/graphics/GraphicsContext.cpp
M Source/WebCore/platform/graphics/GraphicsContext.h
M Source/WebCore/platform/graphics/NullGraphicsContext.h
M Source/WebCore/platform/graphics/cairo/CairoOperationRecorder.cpp
M Source/WebCore/platform/graphics/cairo/CairoOperationRecorder.h
M Source/WebCore/platform/graphics/cv/VideoFrameCV.mm
M Source/WebCore/platform/graphics/displaylists/DisplayListRecorderImpl.cpp
M Source/WebCore/platform/graphics/displaylists/DisplayListRecorderImpl.h
M Source/WebCore/platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp
M Source/WebCore/platform/graphics/gstreamer/VideoFrameGStreamer.cpp
M Source/WebKit/WebProcess/GPU/graphics/RemoteGraphicsContextProxy.cpp
M Source/WebKit/WebProcess/GPU/graphics/RemoteGraphicsContextProxy.h
Log Message:
-----------
Add a common way to get NativeImage from a VideoFrame
(VideoFrame::copyNativeImage())
https://bugs.webkit.org/show_bug.cgi?id=302527
rdar://164713414
Reviewed by Youenn Fablet.
In order to use NativeImage and VideoFrame as the basic building blocks
of WebCore code, add a polymorphic VideoFrame::copyNativeImage() for
converting VideoFrame to a NativeImage.
Move VideoFrame::draw() code to the existing
GraphicsContext::drawVideoFrame() that uses copyNativeImage().
Later commits will allow GPUP-side RemoteVideoFrameProxy instances
create GPUP-side RemoteNativeImageProxy instances, so that working and
holding NativeImage instances from VideoFrames does not need data
transfer from GPUP to WCP.
This is work towards being able to use NativeImage as the basic
abstraction of image draw source, while not needing to transfer
the data between WCP and GPUP.
* Source/WebCore/platform/VideoFrame.cpp:
(WebCore::VideoFrame::copyNativeImage const):
(WebCore::VideoFrame::draw): Deleted.
* Source/WebCore/platform/VideoFrame.h:
* Source/WebCore/platform/graphics/BifurcatedGraphicsContext.cpp:
(WebCore::BifurcatedGraphicsContext::drawVideoFrame):
* Source/WebCore/platform/graphics/BifurcatedGraphicsContext.h:
* Source/WebCore/platform/graphics/GraphicsContext.cpp:
(WebCore::GraphicsContext::drawVideoFrame):
* Source/WebCore/platform/graphics/GraphicsContext.h:
* Source/WebCore/platform/graphics/NullGraphicsContext.h:
* Source/WebCore/platform/graphics/cairo/CairoOperationRecorder.cpp:
(WebCore::Cairo::OperationRecorder::drawVideoFrame):
* Source/WebCore/platform/graphics/cairo/CairoOperationRecorder.h:
* Source/WebCore/platform/graphics/cv/VideoFrameCV.mm:
(WebCore::VideoFrame::copyNativeImage const):
(WebCore::VideoFrame::draw): Deleted.
* Source/WebCore/platform/graphics/displaylists/DisplayListRecorderImpl.cpp:
(WebCore::DisplayList::RecorderImpl::drawVideoFrame):
* Source/WebCore/platform/graphics/displaylists/DisplayListRecorderImpl.h:
* Source/WebCore/platform/graphics/gstreamer/VideoFrameGStreamer.cpp:
(WebCore::VideoFrame::copyNativeImage const):
(WebCore::VideoFrame::draw): Deleted.
* Source/WebKit/WebProcess/GPU/graphics/RemoteGraphicsContextProxy.cpp:
(WebKit::RemoteGraphicsContextProxy::drawVideoFrame):
* Source/WebKit/WebProcess/GPU/graphics/RemoteGraphicsContextProxy.h:
Canonical link: https://commits.webkit.org/304730@main
To unsubscribe from these emails, change your notification settings at
https://github.com/WebKit/WebKit/settings/notifications