Reland "Add webxr-render-path feature + param"
This is a reland of bc4aadf66c45fb4aad4ceea4e48d894c1b22ad9f,
with added BUILDFLAG(ENABLE_VR) condition to fix an unused
variable warning on Android x86/x64 where OS_ANDROID is
true but ENABLE_VR is currently false by default.
Original change's description:
> Add webxr-render-path feature + param
>
> Add a new flag to allow selecting the preferred WebXR render path on Android,
> in preparation for adding additional options in followups. The specific
> path is selected through a string-valued feature parameter.
>
> This replaces the the webvr-experimental-rendering feature flag and
> corresponding Blink-side WebVRExperimentalRendering flag passthrough.
>
> Since the rendering path can now be configured via requestPresent mojo
> response options, there's no need to pass the new feature flag through
> to the Renderer.
>
> Bug: 761436
> Cq-Include-Trybots: master.tryserver.chromium.android:android_optional_gpu_tests_rel;master.tryserver.chromium.linux:linux_optional_gpu_tests_rel;master.tryserver.chromium.mac:mac_optional_gpu_tests_rel;master.tryserver.chromium.win:win_optional_gpu_tests_rel
> Change-Id: Iab39bd9aa04e1748e359be426eafb0f7b88ddffe
> Reviewed-on: https://chromium-review.googlesource.com/841105
> Reviewed-by: Pavel Feldman <[email protected]>
> Reviewed-by: David Dorwin <[email protected]>
> Reviewed-by: Robert Kaplow <[email protected]>
> Reviewed-by: Brandon Jones <[email protected]>
> Commit-Queue: Klaus Weidner <[email protected]>
> Cr-Commit-Position: refs/heads/master@{#530039}
[email protected],[email protected]
Bug: 761436
Change-Id: Ibd86d99b793b9b474ee9d9c0597091b2eb034358
Cq-Include-Trybots: master.tryserver.chromium.android:android_optional_gpu_tests_rel;master.tryserver.chromium.linux:linux_optional_gpu_tests_rel;master.tryserver.chromium.mac:mac_optional_gpu_tests_rel;master.tryserver.chromium.win:win_optional_gpu_tests_rel
Reviewed-on: https://chromium-review.googlesource.com/874130
Reviewed-by: Klaus Weidner <[email protected]>
Reviewed-by: Ian Vollick <[email protected]>
Reviewed-by: Robert Kaplow <[email protected]>
Commit-Queue: Klaus Weidner <[email protected]>
Cr-Commit-Position: refs/heads/master@{#530247}
diff --git a/chrome/browser/about_flags.cc b/chrome/browser/about_flags.cc
index f9c66ec..b05d8f83 100644
--- a/chrome/browser/about_flags.cc
+++ b/chrome/browser/about_flags.cc
@@ -1180,6 +1180,23 @@
arraysize(kMarkHttpAsWarningAndDangerousOnPasswordsAndCreditCards),
nullptr}};
+#if defined(OS_ANDROID) && BUILDFLAG(ENABLE_VR)
+const FeatureEntry::FeatureParam kWebXrRenderPathChoiceClientWait[] = {
+ {features::kWebXrRenderPathParamName,
+ features::kWebXrRenderPathParamValueClientWait}};
+const FeatureEntry::FeatureParam kWebXrRenderPathChoiceGpuFence[] = {
+ {features::kWebXrRenderPathParamName,
+ features::kWebXrRenderPathParamValueGpuFence}};
+
+const FeatureEntry::FeatureVariation kWebXrRenderPathVariations[] = {
+ {flag_descriptions::kWebXrRenderPathChoiceClientWaitDescription,
+ kWebXrRenderPathChoiceClientWait,
+ arraysize(kWebXrRenderPathChoiceClientWait), nullptr},
+ {flag_descriptions::kWebXrRenderPathChoiceGpuFenceDescription,
+ kWebXrRenderPathChoiceGpuFence, arraysize(kWebXrRenderPathChoiceGpuFence),
+ nullptr}};
+#endif // defined(OS_ANDROID) && BUILDFLAG(ENABLE_VR)
+
// RECORDING USER METRICS FOR FLAGS:
// -----------------------------------------------------------------------------
// The first line of the entry is the internal name.
@@ -2198,10 +2215,6 @@
{"enable-webvr", flag_descriptions::kWebvrName,
flag_descriptions::kWebvrDescription, kOsAll,
SINGLE_VALUE_TYPE(switches::kEnableWebVR)},
- {"webvr-experimental-rendering",
- flag_descriptions::kWebVrExperimentalRenderingName,
- flag_descriptions::kWebVrExperimentalRenderingDescription, kOsAll,
- FEATURE_VALUE_TYPE(features::kWebVrExperimentalRendering)},
{"webxr", flag_descriptions::kWebXrName,
flag_descriptions::kWebXrDescription, kOsAll,
FEATURE_VALUE_TYPE(features::kWebXr)},
@@ -2214,6 +2227,11 @@
flag_descriptions::kWebVrVsyncAlignDescription, kOsAndroid,
FEATURE_VALUE_TYPE(features::kWebVrVsyncAlign)},
#if defined(OS_ANDROID)
+ {"webxr-render-path", flag_descriptions::kWebXrRenderPathName,
+ flag_descriptions::kWebXrRenderPathDescription, kOsAndroid,
+ FEATURE_WITH_PARAMS_VALUE_TYPE(features::kWebXrRenderPath,
+ kWebXrRenderPathVariations,
+ "WebXrRenderPath")},
// TODO(crbug.com/731802): Use #if BUILDFLAG(ENABLE_VR_BROWSING) instead.
{"vr-browsing", flag_descriptions::kVrBrowsingName,
flag_descriptions::kVrBrowsingDescription, kOsAndroid,