| 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 88 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 99 | 99 |
| 100 if (command_line.HasSwitch(switches::kEnableDisplayList2dCanvas)) | 100 if (command_line.HasSwitch(switches::kEnableDisplayList2dCanvas)) |
| 101 WebRuntimeFeatures::enableDisplayList2dCanvas(true); | 101 WebRuntimeFeatures::enableDisplayList2dCanvas(true); |
| 102 | 102 |
| 103 if (command_line.HasSwitch(switches::kDisableDisplayList2dCanvas)) | 103 if (command_line.HasSwitch(switches::kDisableDisplayList2dCanvas)) |
| 104 WebRuntimeFeatures::enableDisplayList2dCanvas(false); | 104 WebRuntimeFeatures::enableDisplayList2dCanvas(false); |
| 105 | 105 |
| 106 if (command_line.HasSwitch(switches::kForceDisplayList2dCanvas)) | 106 if (command_line.HasSwitch(switches::kForceDisplayList2dCanvas)) |
| 107 WebRuntimeFeatures::forceDisplayList2dCanvas(true); | 107 WebRuntimeFeatures::forceDisplayList2dCanvas(true); |
| 108 | 108 |
| 109 if (command_line.HasSwitch( |
| 110 switches::kEnableCanvas2dDynamicRenderingModeSwitching)) |
| 111 WebRuntimeFeatures::enableCanvas2dDynamicRenderingModeSwitching(true); |
| 112 |
| 109 if (command_line.HasSwitch(switches::kEnableWebGLDraftExtensions)) | 113 if (command_line.HasSwitch(switches::kEnableWebGLDraftExtensions)) |
| 110 WebRuntimeFeatures::enableWebGLDraftExtensions(true); | 114 WebRuntimeFeatures::enableWebGLDraftExtensions(true); |
| 111 | 115 |
| 112 #if defined(OS_MACOSX) | 116 #if defined(OS_MACOSX) |
| 113 bool enable_canvas_2d_image_chromium = command_line.HasSwitch( | 117 bool enable_canvas_2d_image_chromium = command_line.HasSwitch( |
| 114 switches::kEnableGpuMemoryBufferCompositorResources) && | 118 switches::kEnableGpuMemoryBufferCompositorResources) && |
| 115 !command_line.HasSwitch(switches::kDisable2dCanvasImageChromium) && | 119 !command_line.HasSwitch(switches::kDisable2dCanvasImageChromium) && |
| 116 !command_line.HasSwitch(switches::kDisableGpu); | 120 !command_line.HasSwitch(switches::kDisableGpu); |
| 117 | 121 |
| 118 if (enable_canvas_2d_image_chromium) { | 122 if (enable_canvas_2d_image_chromium) { |
| (...skipping 141 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 260 if (command_line.HasSwitch(switches::kDisableBlinkFeatures)) { | 264 if (command_line.HasSwitch(switches::kDisableBlinkFeatures)) { |
| 261 std::vector<std::string> disabled_features = base::SplitString( | 265 std::vector<std::string> disabled_features = base::SplitString( |
| 262 command_line.GetSwitchValueASCII(switches::kDisableBlinkFeatures), | 266 command_line.GetSwitchValueASCII(switches::kDisableBlinkFeatures), |
| 263 ",", base::TRIM_WHITESPACE, base::SPLIT_WANT_ALL); | 267 ",", base::TRIM_WHITESPACE, base::SPLIT_WANT_ALL); |
| 264 for (const std::string& feature : disabled_features) | 268 for (const std::string& feature : disabled_features) |
| 265 WebRuntimeFeatures::enableFeatureFromString(feature, false); | 269 WebRuntimeFeatures::enableFeatureFromString(feature, false); |
| 266 } | 270 } |
| 267 } | 271 } |
| 268 | 272 |
| 269 } // namespace content | 273 } // namespace content |
| OLD | NEW |