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; | |
133 #else | 128 #else |
134 bool enable_web_gl_image_chromium = | 129 bool enable_web_gl_image_chromium = |
135 command_line.HasSwitch(switches::kEnableWebGLImageChromium); | 130 command_line.HasSwitch(switches::kEnableWebGLImageChromium); |
136 #endif | 131 #endif |
137 WebRuntimeFeatures::enableWebGLImageChromium(enable_web_gl_image_chromium); | 132 WebRuntimeFeatures::enableWebGLImageChromium(enable_web_gl_image_chromium); |
138 | 133 |
139 if (command_line.HasSwitch(switches::kForceOverlayFullscreenVideo)) | 134 if (command_line.HasSwitch(switches::kForceOverlayFullscreenVideo)) |
140 WebRuntimeFeatures::forceOverlayFullscreenVideo(true); | 135 WebRuntimeFeatures::forceOverlayFullscreenVideo(true); |
141 | 136 |
142 if (ui::IsOverlayScrollbarEnabled()) | 137 if (ui::IsOverlayScrollbarEnabled()) |
(...skipping 108 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
251 if (command_line.HasSwitch(switches::kDisableBlinkFeatures)) { | 246 if (command_line.HasSwitch(switches::kDisableBlinkFeatures)) { |
252 std::vector<std::string> disabled_features = base::SplitString( | 247 std::vector<std::string> disabled_features = base::SplitString( |
253 command_line.GetSwitchValueASCII(switches::kDisableBlinkFeatures), | 248 command_line.GetSwitchValueASCII(switches::kDisableBlinkFeatures), |
254 ",", base::TRIM_WHITESPACE, base::SPLIT_WANT_ALL); | 249 ",", base::TRIM_WHITESPACE, base::SPLIT_WANT_ALL); |
255 for (const std::string& feature : disabled_features) | 250 for (const std::string& feature : disabled_features) |
256 WebRuntimeFeatures::enableFeatureFromString(feature, false); | 251 WebRuntimeFeatures::enableFeatureFromString(feature, false); |
257 } | 252 } |
258 } | 253 } |
259 | 254 |
260 } // namespace content | 255 } // namespace content |
OLD | NEW |