Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1083)

Unified Diff: content/child/runtime_features.cc

Issue 2023383004: Move Canvas and WebGL Image Chromium behind experiments. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@temp68_enable_webgl
Patch Set: Created 4 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/child/runtime_features.cc
diff --git a/content/child/runtime_features.cc b/content/child/runtime_features.cc
index 9ccead3bb72010954e2fba196a7566342d683164..aaff368313052e2cf0aaf100647c984d3c331676 100644
--- a/content/child/runtime_features.cc
+++ b/content/child/runtime_features.cc
@@ -21,6 +21,21 @@
using blink::WebRuntimeFeatures;
+#if defined(OS_MACOSX)
+namespace {
+// If WebGL Image Chromium is allowed, this feature controls whether it is
+// enabled.
+const base::Feature kWebGLImageChromium{"WebGLImageChromium",
+ base::FEATURE_ENABLED_BY_DEFAULT};
+
+// If Canvas2D Image Chromium is allowed, this feature controls whether it is
+// enabled.
+const base::Feature kCanvas2DImageChromium{"kCanvas2DImageChromium",
+ base::FEATURE_ENABLED_BY_DEFAULT};
+
+} // namespace
Avi (use Gerrit) 2016/06/02 18:20:26 Other features in this file are defined in content
erikchen 2016/06/02 19:45:26 Didn't know about it. Fixed.
+#endif // defined(OS_MACOSX)
+
namespace content {
static void SetRuntimeFeatureDefaultsForPlatform() {
@@ -114,6 +129,11 @@ void SetRuntimeFeaturesDefaultsAndUpdateFromArgs(
switches::kEnableGpuMemoryBufferCompositorResources) &&
!command_line.HasSwitch(switches::kDisable2dCanvasImageChromium) &&
!command_line.HasSwitch(switches::kDisableGpu);
+
+ if (enable_canvas_2d_image_chromium) {
+ enable_canvas_2d_image_chromium =
+ base::FeatureList::IsEnabled(kCanvas2DImageChromium);
+ }
#else
bool enable_canvas_2d_image_chromium = false;
#endif
@@ -125,6 +145,11 @@ void SetRuntimeFeaturesDefaultsAndUpdateFromArgs(
switches::kEnableGpuMemoryBufferCompositorResources) &&
!command_line.HasSwitch(switches::kDisableWebGLImageChromium) &&
!command_line.HasSwitch(switches::kDisableGpu);
+
+ if (enable_web_gl_image_chromium) {
+ enable_web_gl_image_chromium =
+ base::FeatureList::IsEnabled(kWebGLImageChromium);
+ }
#else
bool enable_web_gl_image_chromium =
command_line.HasSwitch(switches::kEnableWebGLImageChromium);
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698