Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: 7040d58fe3bd1070a1d68477d0fb3a397f2d2d05
https://github.com/WebKit/WebKit/commit/7040d58fe3bd1070a1d68477d0fb3a397f2d2d05
Author: Said Abou-Hallawa <[email protected]>
Date: 2026-08-12 (Wed, 12 Aug 2026)
Changed paths:
M
LayoutTests/imported/w3c/web-platform-tests/webcodecs/idlharness.https.any-expected.txt
M
LayoutTests/imported/w3c/web-platform-tests/webcodecs/idlharness.https.any.worker-expected.txt
M
LayoutTests/imported/w3c/web-platform-tests/webcodecs/image-decoder-image-orientation-none.https-expected.txt
M
LayoutTests/imported/w3c/web-platform-tests/webcodecs/image-decoder.crossOriginIsolated.https.any-expected.txt
M
LayoutTests/imported/w3c/web-platform-tests/webcodecs/image-decoder.crossOriginIsolated.https.any.worker-expected.txt
M
LayoutTests/imported/w3c/web-platform-tests/webcodecs/image-decoder.https.any-expected.txt
M
LayoutTests/imported/w3c/web-platform-tests/webcodecs/image-decoder.https.any.worker-expected.txt
M
LayoutTests/imported/w3c/web-platform-tests/webcodecs/transfering.https.any-expected.txt
M
LayoutTests/imported/w3c/web-platform-tests/webcodecs/transfering.https.any.worker-expected.txt
A
LayoutTests/platform/glib/imported/w3c/web-platform-tests/webcodecs/image-decoder-image-orientation-none.https-expected.txt
A
LayoutTests/platform/glib/imported/w3c/web-platform-tests/webcodecs/image-decoder.crossOriginIsolated.https.any-expected.txt
A
LayoutTests/platform/glib/imported/w3c/web-platform-tests/webcodecs/image-decoder.crossOriginIsolated.https.any.worker-expected.txt
A
LayoutTests/platform/glib/imported/w3c/web-platform-tests/webcodecs/image-decoder.https.any-expected.txt
A
LayoutTests/platform/glib/imported/w3c/web-platform-tests/webcodecs/image-decoder.https.any.worker-expected.txt
M Source/WTF/Scripts/Preferences/UnifiedWebPreferences.yaml
M Source/WebCore/Modules/webcodecs/WebCodecsImageDecoder.cpp
M Source/WebCore/Modules/webcodecs/WebCodecsImageDecoder.h
M Source/WebCore/Modules/webcodecs/WebCodecsImageTrackList.cpp
M Source/WebCore/Modules/webcodecs/WebCodecsImageTrackList.h
M Source/WebCore/Modules/webcodecs/WebCodecsVideoFrame.cpp
M Source/WebCore/Modules/webcodecs/WebCodecsVideoFrame.h
M Source/WebCore/testing/Internals.cpp
Log Message:
-----------
Implement WebCodecsImageDecoder
https://bugs.webkit.org/show_bug.cgi?id=315546
rdar://177922841
Reviewed by Jean-Yves Avenard.
WebCodecsImageDecoder[1] allows treating animated formats as temporal tracks. It
enables seeking to and decoding individual frames directly into VideoFrame
objects.
Decoded image frames can be routed directly into WebGPU textures using the same
high-efficiency path we provide for VideoDecoder, rather than relying on
DOM-based
fall-backs.
WebCodecsImageTrackList[2] retrieves the tracks in the image. Currently the
image
APIs do not have provide any track information. For now a single track is
assumed
per image.
This change implements the basics of this Web API. Following changes will fix
the
reset of the ImageDecoder WPT failures.
[1] https://w3c.github.io/webcodecs/#imagedecoder-interface
[2] https://w3c.github.io/webcodecs/#imagetracklist-interface
* Source/WTF/Scripts/Preferences/UnifiedWebPreferences.yaml:
*
LayoutTests/imported/w3c/web-platform-tests/webcodecs/idlharness.https.any-expected.txt:
*
LayoutTests/imported/w3c/web-platform-tests/webcodecs/idlharness.https.any.worker-expected.txt:
*
LayoutTests/imported/w3c/web-platform-tests/webcodecs/image-decoder-image-orientation-none.https-expected.txt:
*
LayoutTests/imported/w3c/web-platform-tests/webcodecs/image-decoder.crossOriginIsolated.https.any-expected.txt:
*
LayoutTests/imported/w3c/web-platform-tests/webcodecs/image-decoder.crossOriginIsolated.https.any.worker-expected.txt:
*
LayoutTests/imported/w3c/web-platform-tests/webcodecs/image-decoder.https.any-expected.txt:
*
LayoutTests/imported/w3c/web-platform-tests/webcodecs/image-decoder.https.any.worker-expected.txt:
*
LayoutTests/imported/w3c/web-platform-tests/webcodecs/transfering.https.any-expected.txt:
*
LayoutTests/imported/w3c/web-platform-tests/webcodecs/transfering.https.any.worker-expected.txt:
* Source/WebCore/Modules/webcodecs/WebCodecsImageDecoder.cpp:
(WebCore::WebCodecsImageDecoder::WebCodecsImageDecoder):
(WebCore::WebCodecsImageDecoder::setInternalDecoder):
(WebCore::WebCodecsImageDecoder::buildTrackList):
(WebCore::WebCodecsImageDecoder::queueSingleton):
(WebCore::WebCodecsImageDecoder::createNativeImageAtIndex):
(WebCore::WebCodecsImageDecoder::resolvePendingDecodePromises):
(WebCore::WebCodecsImageDecoder::rejectPendingDecodePromises):
(WebCore::WebCodecsImageDecoder::decode):
(WebCore::WebCodecsImageDecoder::resetDecoder):
(WebCore::WebCodecsImageDecoder::closeDecoder):
(WebCore::WebCodecsImageDecoder::reset):
(WebCore::WebCodecsImageDecoder::close):
(WebCore::WebCodecsImageDecoder::isTypeSupported):
(WebCore::WebCodecsImageDecoder::stop):
(WebCore::WebCodecsImageDecoder::tracks const): Deleted.
(WebCore::WebCodecsImageDecoder::createInternalDecoder):
(WebCore::WebCodecsImageDecoder::setInternalDecoderData):
(WebCore::WebCodecsImageDecoder::sinkStreamToInternalDecoder):
(WebCore::WebCodecsImageDecoder::establishTrackList):
(WebCore::WebCodecsImageDecoder::settlePendingDecodePromises):
(WebCore::WebCodecsImageDecoder::queueDecodeRequest):
(WebCore::WebCodecsImageDecoder::queuePendingDecodeRequests):
(WebCore::WebCodecsImageDecoder::fulfillPendingDecodePromises):
* Source/WebCore/Modules/webcodecs/WebCodecsImageDecoder.h:
* Source/WebCore/Modules/webcodecs/WebCodecsImageTrackList.cpp:
(WebCore::WebCodecsImageTrackList::create):
(WebCore::WebCodecsImageTrackList::WebCodecsImageTrackList):
(WebCore::WebCodecsImageTrackList::setTrackList):
(WebCore::WebCodecsImageTrackList::closeTrackList):
(WebCore::WebCodecsImageTrackList::clearTrackList):
* Source/WebCore/Modules/webcodecs/WebCodecsImageTrackList.h:
* Source/WebCore/Modules/webcodecs/WebCodecsVideoFrame.cpp:
(WebCore::WebCodecsVideoFrame::create):
* Source/WebCore/Modules/webcodecs/WebCodecsVideoFrame.h:
* Source/WebCore/testing/Internals.cpp:
(WebCore::Internals::loadArtworkImage):
*
LayoutTests/platform/glib/imported/w3c/web-platform-tests/webcodecs/image-decoder-image-orientation-none.https-expected.txt:
Added.
*
LayoutTests/platform/glib/imported/w3c/web-platform-tests/webcodecs/image-decoder.crossOriginIsolated.https.any-expected.txt:
Added.
*
LayoutTests/platform/glib/imported/w3c/web-platform-tests/webcodecs/image-decoder.crossOriginIsolated.https.any.worker-expected.txt:
Added.
*
LayoutTests/platform/glib/imported/w3c/web-platform-tests/webcodecs/image-decoder.https.any-expected.txt:
Added.
*
LayoutTests/platform/glib/imported/w3c/web-platform-tests/webcodecs/image-decoder.https.any.worker-expected.txt:
Added.
Canonical link: https://commits.webkit.org/319040@main
To unsubscribe from these emails, change your notification settings at
https://github.com/WebKit/WebKit/settings/notifications