Chromium Code Reviews| 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 89 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 100 | 100 |
| 101 if (command_line.HasSwitch(switches::kDisableDisplayList2dCanvas)) | 101 if (command_line.HasSwitch(switches::kDisableDisplayList2dCanvas)) |
| 102 WebRuntimeFeatures::enableDisplayList2dCanvas(false); | 102 WebRuntimeFeatures::enableDisplayList2dCanvas(false); |
| 103 | 103 |
| 104 if (command_line.HasSwitch(switches::kForceDisplayList2dCanvas)) | 104 if (command_line.HasSwitch(switches::kForceDisplayList2dCanvas)) |
| 105 WebRuntimeFeatures::forceDisplayList2dCanvas(true); | 105 WebRuntimeFeatures::forceDisplayList2dCanvas(true); |
| 106 | 106 |
| 107 if (command_line.HasSwitch(switches::kEnableWebGLDraftExtensions)) | 107 if (command_line.HasSwitch(switches::kEnableWebGLDraftExtensions)) |
| 108 WebRuntimeFeatures::enableWebGLDraftExtensions(true); | 108 WebRuntimeFeatures::enableWebGLDraftExtensions(true); |
| 109 | 109 |
| 110 #if defined(OS_MACOSX) | |
| 111 bool enable_canvas_2d_image_chromium = command_line.HasSwitch( | |
| 112 switches::kEnableGpuMemoryBufferCompositorResources) && | |
| 113 !command_line.HasSwitch(switches::kDisable2dCanvasImageChromium) && | |
| 114 !command_line.HasSwitch(switches::kDisableGpu); | |
| 115 #else | |
| 116 bool enable_canvas_2d_image_chromium = false; | |
| 117 #endif | |
| 118 WebRuntimeFeatures::enableCanvas2dImageChromium( | |
| 119 enable_canvas_2d_image_chromium); | |
|
Ken Russell (switch to Gerrit)
2016/03/10 02:00:04
I think you should add a new GPU driver bug workar
| |
| 120 | |
| 110 if (command_line.HasSwitch(switches::kEnableWebGLImageChromium)) | 121 if (command_line.HasSwitch(switches::kEnableWebGLImageChromium)) |
| 111 WebRuntimeFeatures::enableWebGLImageChromium(true); | 122 WebRuntimeFeatures::enableWebGLImageChromium(true); |
| 112 | 123 |
| 113 if (command_line.HasSwitch(switches::kForceOverlayFullscreenVideo)) | 124 if (command_line.HasSwitch(switches::kForceOverlayFullscreenVideo)) |
| 114 WebRuntimeFeatures::forceOverlayFullscreenVideo(true); | 125 WebRuntimeFeatures::forceOverlayFullscreenVideo(true); |
| 115 | 126 |
| 116 if (ui::IsOverlayScrollbarEnabled()) | 127 if (ui::IsOverlayScrollbarEnabled()) |
| 117 WebRuntimeFeatures::enableOverlayScrollbars(true); | 128 WebRuntimeFeatures::enableOverlayScrollbars(true); |
| 118 | 129 |
| 119 if (command_line.HasSwitch(switches::kEnablePreciseMemoryInfo)) | 130 if (command_line.HasSwitch(switches::kEnablePreciseMemoryInfo)) |
| (...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 178 if (command_line.HasSwitch(switches::kDisableBlinkFeatures)) { | 189 if (command_line.HasSwitch(switches::kDisableBlinkFeatures)) { |
| 179 std::vector<std::string> disabled_features = base::SplitString( | 190 std::vector<std::string> disabled_features = base::SplitString( |
| 180 command_line.GetSwitchValueASCII(switches::kDisableBlinkFeatures), | 191 command_line.GetSwitchValueASCII(switches::kDisableBlinkFeatures), |
| 181 ",", base::TRIM_WHITESPACE, base::SPLIT_WANT_ALL); | 192 ",", base::TRIM_WHITESPACE, base::SPLIT_WANT_ALL); |
| 182 for (const std::string& feature : disabled_features) | 193 for (const std::string& feature : disabled_features) |
| 183 WebRuntimeFeatures::enableFeatureFromString(feature, false); | 194 WebRuntimeFeatures::enableFeatureFromString(feature, false); |
| 184 } | 195 } |
| 185 } | 196 } |
| 186 | 197 |
| 187 } // namespace content | 198 } // namespace content |
| OLD | NEW |