Skip to content

Conversation

@jyavenard
Copy link
Member

@jyavenard jyavenard commented Sep 29, 2025

0bdf4bc

vp9HardwareDecoderAvailable() is non-functional when called in the content process.
https://bugs.webkit.org/show_bug.cgi?id=299710
rdar://161534911

Reviewed by Youenn Fablet.

We re-use the VP9TestingOverrides structure to be able to store if we
the VP9 HW decoder is available. When the value of GPUProcessConnectionInfo::hasVP9HardwareDecoder
is retrieved, we set it to VP9TestingOverrides.

This allows to enable the SourceBufferParserWebM to work in the content process.

* Source/WebCore/platform/graphics/cocoa/VP9UtilitiesCocoa.h:
* Source/WebCore/platform/graphics/cocoa/VP9UtilitiesCocoa.mm:
(WebCore::VP9TestingOverrides::setVP9HardwareDecoderEnabledOverride):
(WebCore::vp9HardwareDecoderAvailable):
* Source/WebKit/WebProcess/GPU/GPUProcessConnection.cpp:
(WebKit::GPUProcessConnection::didInitialize):

Canonical link: https://commits.webkit.org/300722@main

322d5b8

Misc iOS, visionOS, tvOS & watchOS macOS Linux Windows Apple Internal
✅ 🧪 style ✅ 🛠 ios ✅ 🛠 mac ✅ 🛠 wpe ✅ 🛠 win ✅ 🛠 ios-apple
✅ 🧪 bindings ✅ 🛠 ios-sim ✅ 🛠 mac-AS-debug ✅ 🧪 wpe-wk2 🧪 win-tests loading 🛠 mac-apple
✅ 🧪 webkitperl ✅ 🧪 ios-wk2 ✅ 🧪 api-mac ✅ 🧪 api-wpe ✅ 🛠 vision-apple
✅ 🧪 ios-wk2-wpt ✅ 🧪 mac-wk1 ✅ 🛠 wpe-cairo
✅ 🧪 api-ios ✅ 🧪 mac-wk2 ✅ 🛠 gtk
✅ 🛠 vision ✅ 🧪 mac-AS-debug-wk2 ✅ 🧪 gtk-wk2
✅ 🛠 vision-sim ✅ 🧪 mac-wk2-stress ✅ 🧪 api-gtk
✅ 🛠 🧪 merge ✅ 🧪 vision-wk2 ✅ 🧪 mac-intel-wk2 🛠 playstation
✅ 🛠 tv ✅ 🛠 mac-safer-cpp
✅ 🛠 tv-sim
✅ 🛠 watch
✅ 🛠 watch-sim

@jyavenard jyavenard requested a review from cdumez as a code owner September 29, 2025 07:26
@jyavenard jyavenard self-assigned this Sep 29, 2025
@jyavenard jyavenard added the Media Bugs related to the HTML 5 Media elements. label Sep 29, 2025

return canLoad_VideoToolbox_VTIsHardwareDecodeSupported() && VTIsHardwareDecodeSupported(kCMVideoCodecType_VP9);
if (canLoad_VideoToolbox_VTIsHardwareDecodeSupported() && VTIsHardwareDecodeSupported(kCMVideoCodecType_VP9))
return true;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would tend to revert the calls (if we have an override use it, otherwise call VT).


void VP9TestingOverrides::setVP9HardwareDecoderEnabledOverride(std::optional<bool>&& disabled)
{
m_vp9HardwareDecoderEnabledOverride = WTFMove(disabled);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
m_vp9HardwareDecoderEnabledOverride = WTFMove(disabled);
ASSERT(! m_vp9HardwareDecoderEnabledOverride);
m_vp9HardwareDecoderEnabledOverride = WTFMove(disabled);

@webkit-ews-buildbot webkit-ews-buildbot added the merging-blocked Applied to prevent a change from being merged label Sep 29, 2025
@jyavenard jyavenard force-pushed the eng/vp9HardwareDecoderAvailable-is-non-functional-when-called-in-the-content-process branch from dd044b2 to 322d5b8 Compare September 29, 2025 22:05
@jyavenard jyavenard added merge-queue Applied to send a pull request to merge-queue and removed merging-blocked Applied to prevent a change from being merged labels Sep 29, 2025
…ntent process.

https://bugs.webkit.org/show_bug.cgi?id=299710
rdar://161534911

Reviewed by Youenn Fablet.

We re-use the VP9TestingOverrides structure to be able to store if we
the VP9 HW decoder is available. When the value of GPUProcessConnectionInfo::hasVP9HardwareDecoder
is retrieved, we set it to VP9TestingOverrides.

This allows to enable the SourceBufferParserWebM to work in the content process.

* Source/WebCore/platform/graphics/cocoa/VP9UtilitiesCocoa.h:
* Source/WebCore/platform/graphics/cocoa/VP9UtilitiesCocoa.mm:
(WebCore::VP9TestingOverrides::setVP9HardwareDecoderEnabledOverride):
(WebCore::vp9HardwareDecoderAvailable):
* Source/WebKit/WebProcess/GPU/GPUProcessConnection.cpp:
(WebKit::GPUProcessConnection::didInitialize):

Canonical link: https://commits.webkit.org/300722@main
@webkit-commit-queue webkit-commit-queue force-pushed the eng/vp9HardwareDecoderAvailable-is-non-functional-when-called-in-the-content-process branch from 322d5b8 to 0bdf4bc Compare September 30, 2025 00:13
@webkit-commit-queue
Copy link
Collaborator

Committed 300722@main (0bdf4bc): https://commits.webkit.org/300722@main

Reviewed commits have been landed. Closing PR #51487 and removing active labels.

@webkit-commit-queue webkit-commit-queue merged commit 0bdf4bc into WebKit:main Sep 30, 2025
@webkit-commit-queue webkit-commit-queue removed the merge-queue Applied to send a pull request to merge-queue label Sep 30, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Media Bugs related to the HTML 5 Media elements.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants