This is an updated version of issue 2586803003 which was reverted.
I have removed the problematic "low priority" GL context setting and
made the change conditional on a new ""WebVR experimental rendering
optimizations" feature flag.
When enabled, it uses the own_offscreen_surface flag with WebGL contexts
when WebVR is enabled, to allow the surface to be swapped out with a
compatible one if used for VR presentation later. This must be done
before any WebVR API calls have been made, so it also needs to work
for non-WebVR WebGL canvas drawing.
The change includes support for canvas attributes such as "antialias".
The feature flag is intended to control features which are considered
experimental or risky, so that they can be manually enabled for initial
testing. It is also in preparation for a finch experiment for future
rollout.
BUG=655733
CQ_INCLUDE_TRYBOTS=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
Review-Url: https://codereview.chromium.org/2698573002
Cr-Commit-Position: refs/heads/master@{#451484}
diff --git a/chrome/browser/about_flags.cc b/chrome/browser/about_flags.cc
index 7cb46b7..90c3140 100644
--- a/chrome/browser/about_flags.cc
+++ b/chrome/browser/about_flags.cc
@@ -1623,6 +1623,10 @@
{"enable-webvr", IDS_FLAGS_WEBVR_NAME, IDS_FLAGS_WEBVR_DESCRIPTION, kOsAll,
SINGLE_VALUE_TYPE(switches::kEnableWebVR)},
#if defined(ENABLE_WEBVR)
+ {"enable-webvr-experimental-rendering",
+ IDS_FLAGS_WEBVR_EXPERIMENTAL_RENDERING_NAME,
+ IDS_FLAGS_WEBVR_EXPERIMENTAL_RENDERING_DESCRIPTION, kOsAndroid,
+ FEATURE_VALUE_TYPE(features::kWebVRExperimentalRendering)},
{"enable-vr-shell", IDS_FLAGS_ENABLE_VR_SHELL_NAME,
IDS_FLAGS_ENABLE_VR_SHELL_DESCRIPTION, kOsAndroid,
FEATURE_VALUE_TYPE(features::kVrShell)},