Commit e6bafb58 authored by Evan Shrubsole's avatar Evan Shrubsole Committed by Commit Bot

Enable WebRtcLibvpxEncodeNV12 for non-Cros

Experimentation has shown no crash increases (UMA) and thus this path
is a no-op on non-Cros platforms. Cros will continue to rollout with
behind this feature flag.

Bug: 1134165
Change-Id: I191ca3c8891e94032654ca75bb6fcd64a90e7cc6
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2549762Reviewed-by: default avatarMarkus Handell <handellm@google.com>
Reviewed-by: default avatarKentaro Hara <haraken@chromium.org>
Reviewed-by: default avatarHenrik Boström <hbos@chromium.org>
Commit-Queue: Evan Shrubsole <eshr@google.com>
Cr-Commit-Position: refs/heads/master@{#830168}
parent f403d727
...@@ -806,8 +806,14 @@ const base::Feature kWebAppEnableProtocolHandlers{ ...@@ -806,8 +806,14 @@ const base::Feature kWebAppEnableProtocolHandlers{
// When enabled NV12 frames on a GPU will be forwarded to libvpx encoders // When enabled NV12 frames on a GPU will be forwarded to libvpx encoders
// without conversion to I420. // without conversion to I420.
const base::Feature kWebRtcLibvpxEncodeNV12{"WebRtcLibvpxEncodeNV12", const base::Feature kWebRtcLibvpxEncodeNV12 {
base::FEATURE_DISABLED_BY_DEFAULT}; "WebRtcLibvpxEncodeNV12",
#if defined(OS_CHROMEOS)
base::FEATURE_DISABLED_BY_DEFAULT
#else
base::FEATURE_ENABLED_BY_DEFAULT
#endif
};
// Makes network loading tasks unfreezable so that they can be processed while // Makes network loading tasks unfreezable so that they can be processed while
// the page is frozen. // the page is frozen.
......
...@@ -70,6 +70,9 @@ TEST(WebRtcVideoFrameAdapterTest, ToI420DownScale) { ...@@ -70,6 +70,9 @@ TEST(WebRtcVideoFrameAdapterTest, ToI420DownScale) {
} }
TEST(WebRtcVideoFrameAdapterTest, ToI420DownScaleGmb) { TEST(WebRtcVideoFrameAdapterTest, ToI420DownScaleGmb) {
base::test::ScopedFeatureList scoped_feautre_list;
scoped_feautre_list.InitAndDisableFeature(
blink::features::kWebRtcLibvpxEncodeNV12);
const gfx::Size kCodedSize(1280, 960); const gfx::Size kCodedSize(1280, 960);
const gfx::Rect kVisibleRect(0, 120, 1280, 720); const gfx::Rect kVisibleRect(0, 120, 1280, 720);
const gfx::Size kNaturalSize(640, 360); const gfx::Size kNaturalSize(640, 360);
...@@ -89,9 +92,11 @@ TEST(WebRtcVideoFrameAdapterTest, ToI420DownScaleGmb) { ...@@ -89,9 +92,11 @@ TEST(WebRtcVideoFrameAdapterTest, ToI420DownScaleGmb) {
// The I420 frame should have the same size as the natural size // The I420 frame should have the same size as the natural size
auto i420_frame = gmb_frame_adapter->ToI420(); auto i420_frame = gmb_frame_adapter->ToI420();
ASSERT_TRUE(i420_frame);
EXPECT_EQ(i420_frame->width(), kNaturalSize.width()); EXPECT_EQ(i420_frame->width(), kNaturalSize.width());
EXPECT_EQ(i420_frame->height(), kNaturalSize.height()); EXPECT_EQ(i420_frame->height(), kNaturalSize.height());
auto* get_i420_frame = gmb_frame_adapter->GetI420(); auto* get_i420_frame = gmb_frame_adapter->GetI420();
ASSERT_TRUE(get_i420_frame);
EXPECT_EQ(get_i420_frame->width(), kNaturalSize.width()); EXPECT_EQ(get_i420_frame->width(), kNaturalSize.width());
EXPECT_EQ(get_i420_frame->height(), kNaturalSize.height()); EXPECT_EQ(get_i420_frame->height(), kNaturalSize.height());
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment