OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include "content/child/runtime_features.h" | 5 #include "content/child/runtime_features.h" |
6 | 6 |
7 #include <vector> | 7 #include <vector> |
8 | 8 |
9 #include "base/command_line.h" | 9 #include "base/command_line.h" |
10 #include "base/feature_list.h" | 10 #include "base/feature_list.h" |
(...skipping 107 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
118 bool enable_canvas_2d_image_chromium = false; | 118 bool enable_canvas_2d_image_chromium = false; |
119 #endif | 119 #endif |
120 WebRuntimeFeatures::enableCanvas2dImageChromium( | 120 WebRuntimeFeatures::enableCanvas2dImageChromium( |
121 enable_canvas_2d_image_chromium); | 121 enable_canvas_2d_image_chromium); |
122 | 122 |
123 #if defined(OS_MACOSX) | 123 #if defined(OS_MACOSX) |
124 bool enable_web_gl_image_chromium = command_line.HasSwitch( | 124 bool enable_web_gl_image_chromium = command_line.HasSwitch( |
125 switches::kEnableGpuMemoryBufferCompositorResources) && | 125 switches::kEnableGpuMemoryBufferCompositorResources) && |
126 !command_line.HasSwitch(switches::kDisableWebGLImageChromium) && | 126 !command_line.HasSwitch(switches::kDisableWebGLImageChromium) && |
127 !command_line.HasSwitch(switches::kDisableGpu); | 127 !command_line.HasSwitch(switches::kDisableGpu); |
| 128 |
| 129 // There are two bugs in WebGL image chromium. |
| 130 // https://bugs.chromium.org/p/chromium/issues/detail?id=581777#c37 |
| 131 // TODO(erikchen): When those issues are fixed, reenable this feature. |
| 132 enable_web_gl_image_chromium = false; |
128 #else | 133 #else |
129 bool enable_web_gl_image_chromium = | 134 bool enable_web_gl_image_chromium = |
130 command_line.HasSwitch(switches::kEnableWebGLImageChromium); | 135 command_line.HasSwitch(switches::kEnableWebGLImageChromium); |
131 #endif | 136 #endif |
132 WebRuntimeFeatures::enableWebGLImageChromium(enable_web_gl_image_chromium); | 137 WebRuntimeFeatures::enableWebGLImageChromium(enable_web_gl_image_chromium); |
133 | 138 |
134 if (command_line.HasSwitch(switches::kForceOverlayFullscreenVideo)) | 139 if (command_line.HasSwitch(switches::kForceOverlayFullscreenVideo)) |
135 WebRuntimeFeatures::forceOverlayFullscreenVideo(true); | 140 WebRuntimeFeatures::forceOverlayFullscreenVideo(true); |
136 | 141 |
137 if (ui::IsOverlayScrollbarEnabled()) | 142 if (ui::IsOverlayScrollbarEnabled()) |
(...skipping 108 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
246 if (command_line.HasSwitch(switches::kDisableBlinkFeatures)) { | 251 if (command_line.HasSwitch(switches::kDisableBlinkFeatures)) { |
247 std::vector<std::string> disabled_features = base::SplitString( | 252 std::vector<std::string> disabled_features = base::SplitString( |
248 command_line.GetSwitchValueASCII(switches::kDisableBlinkFeatures), | 253 command_line.GetSwitchValueASCII(switches::kDisableBlinkFeatures), |
249 ",", base::TRIM_WHITESPACE, base::SPLIT_WANT_ALL); | 254 ",", base::TRIM_WHITESPACE, base::SPLIT_WANT_ALL); |
250 for (const std::string& feature : disabled_features) | 255 for (const std::string& feature : disabled_features) |
251 WebRuntimeFeatures::enableFeatureFromString(feature, false); | 256 WebRuntimeFeatures::enableFeatureFromString(feature, false); |
252 } | 257 } |
253 } | 258 } |
254 | 259 |
255 } // namespace content | 260 } // namespace content |
OLD | NEW |