Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(392)

Side by Side Diff: content/child/runtime_features.cc

Issue 2377883002: Expose --disable-gpu-compositing browser arg to Blink (Closed)
Patch Set: rebse after Blink Format Created 4 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | third_party/WebKit/Source/platform/RuntimeEnabledFeatures.in » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 97 matching lines...) Expand 10 before | Expand all | Expand 10 after
108 108
109 if (command_line.HasSwitch(switches::kEnableDisplayList2dCanvas)) 109 if (command_line.HasSwitch(switches::kEnableDisplayList2dCanvas))
110 WebRuntimeFeatures::enableDisplayList2dCanvas(true); 110 WebRuntimeFeatures::enableDisplayList2dCanvas(true);
111 111
112 if (command_line.HasSwitch(switches::kDisableDisplayList2dCanvas)) 112 if (command_line.HasSwitch(switches::kDisableDisplayList2dCanvas))
113 WebRuntimeFeatures::enableDisplayList2dCanvas(false); 113 WebRuntimeFeatures::enableDisplayList2dCanvas(false);
114 114
115 if (command_line.HasSwitch(switches::kForceDisplayList2dCanvas)) 115 if (command_line.HasSwitch(switches::kForceDisplayList2dCanvas))
116 WebRuntimeFeatures::forceDisplayList2dCanvas(true); 116 WebRuntimeFeatures::forceDisplayList2dCanvas(true);
117 117
118 if (command_line.HasSwitch(switches::kDisableGpuCompositing) ||
119 command_line.HasSwitch(switches::kDisableGpu))
danakj 2016/10/04 21:41:27 Sorry just noticed this but you don't need to chec
120 WebRuntimeFeatures::enableGpuCompositing(false);
121 else
122 WebRuntimeFeatures::enableGpuCompositing(true);
123
118 if (command_line.HasSwitch( 124 if (command_line.HasSwitch(
119 switches::kEnableCanvas2dDynamicRenderingModeSwitching)) 125 switches::kEnableCanvas2dDynamicRenderingModeSwitching))
120 WebRuntimeFeatures::enableCanvas2dDynamicRenderingModeSwitching(true); 126 WebRuntimeFeatures::enableCanvas2dDynamicRenderingModeSwitching(true);
121 127
122 if (command_line.HasSwitch(switches::kEnableWebGLDraftExtensions)) 128 if (command_line.HasSwitch(switches::kEnableWebGLDraftExtensions))
123 WebRuntimeFeatures::enableWebGLDraftExtensions(true); 129 WebRuntimeFeatures::enableWebGLDraftExtensions(true);
124 130
125 #if defined(OS_MACOSX) 131 #if defined(OS_MACOSX)
126 bool enable_canvas_2d_image_chromium = command_line.HasSwitch( 132 bool enable_canvas_2d_image_chromium = command_line.HasSwitch(
127 switches::kEnableGpuMemoryBufferCompositorResources) && 133 switches::kEnableGpuMemoryBufferCompositorResources) &&
(...skipping 188 matching lines...) Expand 10 before | Expand all | Expand 10 after
316 if (command_line.HasSwitch(switches::kDisableBlinkFeatures)) { 322 if (command_line.HasSwitch(switches::kDisableBlinkFeatures)) {
317 std::vector<std::string> disabled_features = base::SplitString( 323 std::vector<std::string> disabled_features = base::SplitString(
318 command_line.GetSwitchValueASCII(switches::kDisableBlinkFeatures), 324 command_line.GetSwitchValueASCII(switches::kDisableBlinkFeatures),
319 ",", base::TRIM_WHITESPACE, base::SPLIT_WANT_ALL); 325 ",", base::TRIM_WHITESPACE, base::SPLIT_WANT_ALL);
320 for (const std::string& feature : disabled_features) 326 for (const std::string& feature : disabled_features)
321 WebRuntimeFeatures::enableFeatureFromString(feature, false); 327 WebRuntimeFeatures::enableFeatureFromString(feature, false);
322 } 328 }
323 } 329 }
324 330
325 } // namespace content 331 } // namespace content
OLDNEW
« no previous file with comments | « no previous file | third_party/WebKit/Source/platform/RuntimeEnabledFeatures.in » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698