Add ANGLE renderer switch to Experiments page on Mac
This CL enables Mac users to switch between ANGLE's GL and Metal
backends. It also updates tools/metrics/histograms/enums.xml with
missing enum names.
Bug: chromium:1216126
Change-Id: I68a0357356539139070e4ef76f1740709a4bb0a2
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3168329
Reviewed-by: Kenneth Russell <[email protected]>
Commit-Queue: Jonah Ryan-Davis <[email protected]>
Cr-Commit-Position: refs/heads/main@{#923466}
diff --git a/chrome/browser/flag_descriptions.cc b/chrome/browser/flag_descriptions.cc
index c0450ea9..8f04b83 100644
--- a/chrome/browser/flag_descriptions.cc
+++ b/chrome/browser/flag_descriptions.cc
@@ -3877,16 +3877,13 @@
const char kRunVideoCaptureServiceInBrowserProcessDescription[] =
"Run the video capture service in the browser process.";
-const char kUseAngleName[] = "Choose ANGLE graphics backend";
-const char kUseAngleDescription[] =
+const char kUseAngleDescriptionWindows[] =
"Choose the graphics backend for ANGLE. D3D11 is used on most Windows "
"computers by default. Using the OpenGL driver as the graphics backend may "
"result in higher performance in some graphics-heavy applications, "
"particularly on NVIDIA GPUs. It can increase battery and memory usage of "
"video playback.";
-const char kUseAngleDefault[] = "Default";
-const char kUseAngleGL[] = "OpenGL";
const char kUseAngleD3D11[] = "D3D11";
const char kUseAngleD3D9[] = "D3D9";
const char kUseAngleD3D11on12[] = "D3D11on12";
@@ -3964,8 +3961,27 @@
const char kScreenTimeDescription[] =
"Integrate with the macOS Screen Time system.";
+const char kUseAngleDescriptionMac[] =
+ "Choose the graphics backend for ANGLE. The OpenGL backend is soon to be "
+ "deprecated on Mac, and may contain driver bugs that are not planned to be "
+ "fixed. The Metal backend is still experimental, and may contain bugs that "
+ "are still being worked on. The Metal backend should be more performant, "
+ "but may still be behind the OpenGL backend until fully released.";
+
+const char kUseAngleMetal[] = "Metal";
+
#endif
+// Windows and Mac -------------------------------------------------------------
+
+#if defined(OS_WIN) || defined(OS_MAC)
+
+const char kUseAngleName[] = "Choose ANGLE graphics backend";
+const char kUseAngleDefault[] = "Default";
+const char kUseAngleGL[] = "OpenGL";
+
+#endif // defined(OS_WIN) || defined(OS_MAC)
+
// Chrome OS -------------------------------------------------------------------
#if BUILDFLAG(IS_CHROMEOS_ASH)