Skip to content

Commit

Permalink
[Capture] Add new slow capture feature flag
Browse files Browse the repository at this point in the history
This patch adds a new feature flag for enabling subtree capture for
aura::Window on Ash. This flag is default enabled and paves the way for
us to add subtree capture to the FrameSinkVideoCapturer side-by-side
with the legacy SlowWindowCapturerChromeOS implementation.

Bug: 958175
Change-Id: I9c42148d253bc3fe0cab018ec29aa9bdd011bcc6
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2903838
Commit-Queue: Jordan Bayles <jophba@chromium.org>
Reviewed-by: John Abd-El-Malek <jam@chromium.org>
Cr-Commit-Position: refs/heads/master@{#884566}
  • Loading branch information
baylesj authored and Chromium LUCI CQ committed May 19, 2021
1 parent ab66d98 commit 7da20a2
Show file tree
Hide file tree
Showing 7 changed files with 40 additions and 1 deletion.
6 changes: 6 additions & 0 deletions chrome/browser/about_flags.cc
Original file line number Diff line number Diff line change
Expand Up @@ -2609,6 +2609,12 @@ const FeatureEntry kFeatureEntries[] = {
kReaderModeDiscoverabilityVariations,
"ReaderMode")},
#endif // !defined(OS_ANDROID)
#if BUILDFLAG(IS_CHROMEOS_ASH)
{"enable-aura-window-subtree-capture",
flag_descriptions::kAuraWindowSubtreeCaptureName,
flag_descriptions::kAuraWindowSubtreeCaptureDescription, kOsCrOS,
FEATURE_VALUE_TYPE(features::kAuraWindowSubtreeCapture)},
#endif // BUILDFLAG(IS_CHROMEOS_ASH)
#if defined(WEBRTC_USE_PIPEWIRE)
{"enable-webrtc-pipewire-capturer",
flag_descriptions::kWebrtcPipeWireCapturerName,
Expand Down
5 changes: 5 additions & 0 deletions chrome/browser/flag-metadata.json
Original file line number Diff line number Diff line change
Expand Up @@ -1330,6 +1330,11 @@
"owners": [ "beccahughes", "media-dev" ],
"expiry_milestone": 82
},
{
"name": "enable-aura-window-subtree-capture",
"owners": [ "jophba" ],
"expiry_milestone": 102
},
{
"name": "enable-auto-select",
"owners": ["croissant-eng"],
Expand Down
7 changes: 7 additions & 0 deletions chrome/browser/flag_descriptions.cc
Original file line number Diff line number Diff line change
Expand Up @@ -5133,6 +5133,13 @@ const char kUIDebugToolsDescription[] =
"Enables additional keyboard shortcuts to help debugging.";
#endif

#if BUILDFLAG(IS_CHROMEOS_ASH)
const char kAuraWindowSubtreeCaptureName[] = "ChromeOS Window Subtree Capture";
const char kAuraWindowSubtreeCaptureDescription[] =
"Enables capture of ChromeOS Aura windows using subtree capture. When "
"disabled, the legacy slow capturer will be used.";
#endif // BUILDFLAG(IS_CHROMEOS_ASH)

#if defined(WEBRTC_USE_PIPEWIRE)
const char kWebrtcPipeWireCapturerName[] = "WebRTC PipeWire support";
const char kWebrtcPipeWireCapturerDescription[] =
Expand Down
5 changes: 5 additions & 0 deletions chrome/browser/flag_descriptions.h
Original file line number Diff line number Diff line change
Expand Up @@ -3021,6 +3021,11 @@ extern const char kUIDebugToolsName[];
extern const char kUIDebugToolsDescription[];
#endif

#if BUILDFLAG(IS_CHROMEOS_ASH)
extern const char kAuraWindowSubtreeCaptureName[];
extern const char kAuraWindowSubtreeCaptureDescription[];
#endif // BUILDFLAG(IS_CHROMEOS_ASH)

#if defined(WEBRTC_USE_PIPEWIRE)
extern const char kWebrtcPipeWireCapturerName[];
extern const char kWebrtcPipeWireCapturerDescription[];
Expand Down
10 changes: 10 additions & 0 deletions content/public/common/content_features.cc
Original file line number Diff line number Diff line change
Expand Up @@ -1046,6 +1046,16 @@ const base::FeatureParam<bool>
kSendWebUIJavaScriptErrorReportsSendToProductionVariation, true};
#endif

#if BUILDFLAG(IS_CHROMEOS_ASH)
// Controls whether the new subtree capture path is used for window capturing on
// ChromeOS Ash, instead of the legacy SlowWindowCapturerChromeOS
// implementation.
// TODO(crbug.com/1210549): remove once we have determined the new path is
// stable.
const base::Feature kAuraWindowSubtreeCapture{"AuraWindowSubtreeCapture",
base::FEATURE_ENABLED_BY_DEFAULT};
#endif

#if defined(WEBRTC_USE_PIPEWIRE)
// Controls whether the PipeWire support for screen capturing is enabled on the
// Wayland display server.
Expand Down
6 changes: 5 additions & 1 deletion content/public/common/content_features.h
Original file line number Diff line number Diff line change
Expand Up @@ -269,7 +269,11 @@ CONTENT_EXPORT extern const char
kSendWebUIJavaScriptErrorReportsSendToProductionVariation[];
CONTENT_EXPORT extern const base::FeatureParam<bool>
kWebUIJavaScriptErrorReportsSendToProductionParam;
#endif
#endif // defined(OS_LINUX) || defined(OS_CHROMEOS)

#if BUILDFLAG(IS_CHROMEOS_ASH)
CONTENT_EXPORT extern const base::Feature kAuraWindowSubtreeCapture;
#endif // BUILDFLAG(IS_CHROMEOS_ASH)

#if defined(WEBRTC_USE_PIPEWIRE)
CONTENT_EXPORT extern const base::Feature kWebRtcPipeWireCapturer;
Expand Down
2 changes: 2 additions & 0 deletions tools/metrics/histograms/enums.xml
Original file line number Diff line number Diff line change
Expand Up @@ -45064,6 +45064,7 @@ from previous Chrome versions.
<int value="-1684773837" label="TabEngagementReportingAndroid:disabled"/>
<int value="-1684123448" label="disable-best-effort-tasks"/>
<int value="-1682843294" label="DataReductionProxyDecidesTransform:enabled"/>
<int value="-1679849626" label="AuraWindowSubtreeCapture:disabled"/>
<int value="-1679829698" label="ColorProviderRedirection:disabled"/>
<int value="-1679624666" label="NtpRealbox:enabled"/>
<int value="-1677715989" label="UnifiedConsent:disabled"/>
Expand Down Expand Up @@ -46409,6 +46410,7 @@ from previous Chrome versions.
<int value="-560114351" label="OfflinePagesRenovations:disabled"/>
<int value="-558471324" label="PreviewsCoinFlipHoldback_UKMOnly:disabled"/>
<int value="-557742250" label="ContentSuggestionsCategories:disabled"/>
<int value="-556662059" label="AuraWindowSubtreeCapture:enabled"/>
<int value="-556218705" label="SlowDCTimerInterruptsWin:enabled"/>
<int value="-555341956" label="AutofillSaveAndFillVPA:enabled"/>
<int value="-548082154" label="protect-sync-credential:disabled"/>
Expand Down

0 comments on commit 7da20a2

Please sign in to comment.