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

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

Issue 2141793002: Improving canvas 2D performance by switching graphics rendering pipeline. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 5 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
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 88 matching lines...) Expand 10 before | Expand all | Expand 10 after
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(switches::kEnableCanvas2dDynamicPipelineMode))
110 WebRuntimeFeatures::enableCanvas2dDynamicPipelineMode(true);
111
109 if (command_line.HasSwitch(switches::kEnableWebGLDraftExtensions)) 112 if (command_line.HasSwitch(switches::kEnableWebGLDraftExtensions))
110 WebRuntimeFeatures::enableWebGLDraftExtensions(true); 113 WebRuntimeFeatures::enableWebGLDraftExtensions(true);
111 114
112 #if defined(OS_MACOSX) 115 #if defined(OS_MACOSX)
113 bool enable_canvas_2d_image_chromium = command_line.HasSwitch( 116 bool enable_canvas_2d_image_chromium = command_line.HasSwitch(
114 switches::kEnableGpuMemoryBufferCompositorResources) && 117 switches::kEnableGpuMemoryBufferCompositorResources) &&
115 !command_line.HasSwitch(switches::kDisable2dCanvasImageChromium) && 118 !command_line.HasSwitch(switches::kDisable2dCanvasImageChromium) &&
116 !command_line.HasSwitch(switches::kDisableGpu); 119 !command_line.HasSwitch(switches::kDisableGpu);
117 120
118 if (enable_canvas_2d_image_chromium) { 121 if (enable_canvas_2d_image_chromium) {
(...skipping 141 matching lines...) Expand 10 before | Expand all | Expand 10 after
260 if (command_line.HasSwitch(switches::kDisableBlinkFeatures)) { 263 if (command_line.HasSwitch(switches::kDisableBlinkFeatures)) {
261 std::vector<std::string> disabled_features = base::SplitString( 264 std::vector<std::string> disabled_features = base::SplitString(
262 command_line.GetSwitchValueASCII(switches::kDisableBlinkFeatures), 265 command_line.GetSwitchValueASCII(switches::kDisableBlinkFeatures),
263 ",", base::TRIM_WHITESPACE, base::SPLIT_WANT_ALL); 266 ",", base::TRIM_WHITESPACE, base::SPLIT_WANT_ALL);
264 for (const std::string& feature : disabled_features) 267 for (const std::string& feature : disabled_features)
265 WebRuntimeFeatures::enableFeatureFromString(feature, false); 268 WebRuntimeFeatures::enableFeatureFromString(feature, false);
266 } 269 }
267 } 270 }
268 271
269 } // namespace content 272 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698