| 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 "base/command_line.h" | 7 #include "base/command_line.h" |
| 8 #include "base/metrics/field_trial.h" | 8 #include "base/metrics/field_trial.h" |
| 9 #include "content/common/content_switches_internal.h" | 9 #include "content/common/content_switches_internal.h" |
| 10 #include "content/public/common/content_switches.h" | 10 #include "content/public/common/content_switches.h" |
| (...skipping 129 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 140 WebRuntimeFeatures::enableFileSystem(false); | 140 WebRuntimeFeatures::enableFileSystem(false); |
| 141 | 141 |
| 142 if (command_line.HasSwitch(switches::kEnableExperimentalCanvasFeatures)) | 142 if (command_line.HasSwitch(switches::kEnableExperimentalCanvasFeatures)) |
| 143 WebRuntimeFeatures::enableExperimentalCanvasFeatures(true); | 143 WebRuntimeFeatures::enableExperimentalCanvasFeatures(true); |
| 144 | 144 |
| 145 if (command_line.HasSwitch(switches::kEnableAcceleratedJpegDecoding)) | 145 if (command_line.HasSwitch(switches::kEnableAcceleratedJpegDecoding)) |
| 146 WebRuntimeFeatures::enableDecodeToYUV(true); | 146 WebRuntimeFeatures::enableDecodeToYUV(true); |
| 147 | 147 |
| 148 if (command_line.HasSwitch(switches::kDisableDisplayList2dCanvas)) { | 148 if (command_line.HasSwitch(switches::kDisableDisplayList2dCanvas)) { |
| 149 WebRuntimeFeatures::enableDisplayList2dCanvas(false); | 149 WebRuntimeFeatures::enableDisplayList2dCanvas(false); |
| 150 } else if (command_line.HasSwitch(switches::kForceDisplayList2dCanvas)) { |
| 151 WebRuntimeFeatures::forceDisplayList2dCanvas(true); |
| 150 } else if (command_line.HasSwitch(switches::kEnableDisplayList2dCanvas)) { | 152 } else if (command_line.HasSwitch(switches::kEnableDisplayList2dCanvas)) { |
| 151 WebRuntimeFeatures::enableDisplayList2dCanvas(true); | 153 WebRuntimeFeatures::enableDisplayList2dCanvas(true); |
| 152 } else { | 154 } else { |
| 153 WebRuntimeFeatures::enableDisplayList2dCanvas( | 155 WebRuntimeFeatures::enableDisplayList2dCanvas( |
| 154 base::FieldTrialList::FindFullName("DisplayList2dCanvas") == "Enabled" | 156 base::FieldTrialList::FindFullName("DisplayList2dCanvas") == "Enabled" |
| 155 ); | 157 ); |
| 156 } | 158 } |
| 157 | 159 |
| 158 if (command_line.HasSwitch(switches::kEnableWebGLDraftExtensions)) | 160 if (command_line.HasSwitch(switches::kEnableWebGLDraftExtensions)) |
| 159 WebRuntimeFeatures::enableWebGLDraftExtensions(true); | 161 WebRuntimeFeatures::enableWebGLDraftExtensions(true); |
| (...skipping 30 matching lines...) Expand all Loading... |
| 190 | 192 |
| 191 if (command_line.HasSwitch(switches::kDisableSVG1DOM)) { | 193 if (command_line.HasSwitch(switches::kDisableSVG1DOM)) { |
| 192 WebRuntimeFeatures::enableSVG1DOM(false); | 194 WebRuntimeFeatures::enableSVG1DOM(false); |
| 193 } | 195 } |
| 194 | 196 |
| 195 if (command_line.HasSwitch(switches::kReducedReferrerGranularity)) | 197 if (command_line.HasSwitch(switches::kReducedReferrerGranularity)) |
| 196 WebRuntimeFeatures::enableReducedReferrerGranularity(true); | 198 WebRuntimeFeatures::enableReducedReferrerGranularity(true); |
| 197 } | 199 } |
| 198 | 200 |
| 199 } // namespace content | 201 } // namespace content |
| OLD | NEW |