Skip to content

Commit e232efe

Browse files
committed
Make webrtc/captureCanvas-webrtc-software-h264-*.html tests use codecs in WebProcess
https://bugs.webkit.org/show_bug.cgi?id=219147 Reviewed by Eric Carlson. Source/WebCore: Expose internals setting to disable WebRTC codecs in GPU process. Covered by existing tests. * testing/InternalSettings.cpp: (WebCore::InternalSettings::setWebRTCPlatformCodecsInGPUProcessEnabled): * testing/InternalSettings.h: * testing/InternalSettings.idl: LayoutTests: * webrtc/captureCanvas-webrtc-software-h264-baseline.html: * webrtc/captureCanvas-webrtc-software-h264-high.html: Canonical link: https://commits.webkit.org/231826@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@270117 268f45cc-cd09-0410-ab3c-d52691b4dbfc
1 parent acc57ff commit e232efe

7 files changed

Lines changed: 49 additions & 4 deletions

File tree

LayoutTests/ChangeLog

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,13 @@
1+
2020-11-20 Youenn Fablet <youenn@apple.com>
2+
3+
Make webrtc/captureCanvas-webrtc-software-h264-*.html tests use codecs in WebProcess
4+
https://bugs.webkit.org/show_bug.cgi?id=219147
5+
6+
Reviewed by Eric Carlson.
7+
8+
* webrtc/captureCanvas-webrtc-software-h264-baseline.html:
9+
* webrtc/captureCanvas-webrtc-software-h264-high.html:
10+
111
2020-11-20 Alan Bujtas <zalan@apple.com>
212

313
Unreviewed, reverting r270070.

LayoutTests/webrtc/captureCanvas-webrtc-software-h264-baseline.html

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,12 @@
1010
<script src="routines.js"></script>
1111
<script src="captureCanvas-webrtc-software-h264.js"></script>
1212
<script>
13+
if (window.internals) {
14+
internals.setH264HardwareEncoderAllowed(false);
15+
internals.settings.setWebRTCPlatformCodecsInGPUProcessEnabled(false);
16+
}
17+
1318
promise_test((test) => {
14-
if (window.internals)
15-
internals.setH264HardwareEncoderAllowed(false);
1619
return doTest(test, (sdp) => setH264BaselineCodec(sdp));
1720
}, "captureStream with webrtc - h264 baseline");
1821
</script>

LayoutTests/webrtc/captureCanvas-webrtc-software-h264-high.html

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,12 @@
1010
<script src="routines.js"></script>
1111
<script src="captureCanvas-webrtc-software-h264.js"></script>
1212
<script>
13+
if (window.internals) {
14+
internals.setH264HardwareEncoderAllowed(false);
15+
internals.settings.setWebRTCPlatformCodecsInGPUProcessEnabled(false);
16+
}
17+
1318
promise_test((test) => {
14-
if (window.internals)
15-
internals.setH264HardwareEncoderAllowed(false);
1619
return doTest(test, (sdp) => setH264HighCodec(sdp));
1720
}, "captureStream with webrtc - h264 high profile");
1821
</script>

Source/WebCore/ChangeLog

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,18 @@
1+
2020-11-20 Youenn Fablet <youenn@apple.com>
2+
3+
Make webrtc/captureCanvas-webrtc-software-h264-*.html tests use codecs in WebProcess
4+
https://bugs.webkit.org/show_bug.cgi?id=219147
5+
6+
Reviewed by Eric Carlson.
7+
8+
Expose internals setting to disable WebRTC codecs in GPU process.
9+
Covered by existing tests.
10+
11+
* testing/InternalSettings.cpp:
12+
(WebCore::InternalSettings::setWebRTCPlatformCodecsInGPUProcessEnabled):
13+
* testing/InternalSettings.h:
14+
* testing/InternalSettings.idl:
15+
116
2020-11-20 Sergio Villar Senin <svillar@igalia.com>
217

318
[css-flex] Images as flex items should use the overridingLogicalWidth when defined to compute the logical height

Source/WebCore/testing/InternalSettings.cpp

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -447,6 +447,18 @@ ExceptionOr<void> InternalSettings::setFetchAPIKeepAliveEnabled(bool enabled)
447447
return { };
448448
}
449449

450+
ExceptionOr<void> InternalSettings::setWebRTCPlatformCodecsInGPUProcessEnabled(bool enabled)
451+
{
452+
if (!m_page)
453+
return Exception { InvalidAccessError };
454+
#if ENABLE(WEB_RTC)
455+
RuntimeEnabledFeatures::sharedFeatures().setWebRTCPlatformCodecsInGPUProcessEnabled(enabled);
456+
#else
457+
UNUSED_PARAM(enabled);
458+
#endif
459+
return { };
460+
}
461+
450462
ExceptionOr<void> InternalSettings::setCustomPasteboardDataEnabled(bool enabled)
451463
{
452464
if (!m_page)

Source/WebCore/testing/InternalSettings.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -92,6 +92,7 @@ class InternalSettings : public InternalSettingsGenerated {
9292
ExceptionOr<void> setWebGPUEnabled(bool);
9393
ExceptionOr<void> setFetchAPIKeepAliveEnabled(bool);
9494
ExceptionOr<void> setCustomPasteboardDataEnabled(bool);
95+
ExceptionOr<void> setWebRTCPlatformCodecsInGPUProcessEnabled(bool);
9596

9697
// DeprecatedGlobalSettings.
9798
ExceptionOr<void> setShouldManageAudioSessionCategory(bool);

Source/WebCore/testing/InternalSettings.idl

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,7 @@ enum UserInterfaceDirectionPolicy { "Content", "System" };
6868
[MayThrowException] undefined setWebGPUEnabled(boolean enabled);
6969
[MayThrowException] undefined setFetchAPIKeepAliveEnabled(boolean enabled);
7070
[MayThrowException] undefined setCustomPasteboardDataEnabled(boolean enabled);
71+
[MayThrowException] undefined setWebRTCPlatformCodecsInGPUProcessEnabled(boolean enabled);
7172

7273
// DeprecatedGlobalSettings.
7374
[MayThrowException] undefined setShouldManageAudioSessionCategory(boolean should);

0 commit comments

Comments
 (0)