Chromium Code Reviews| Index: cc/layer_tree_settings.cc |
| diff --git a/cc/layer_tree_settings.cc b/cc/layer_tree_settings.cc |
| index 70f2b2c42a22a980f645e39a66319ff10c1b1908..98e4b739561e7e30482f4520d91a7fef95f692b4 100644 |
| --- a/cc/layer_tree_settings.cc |
| +++ b/cc/layer_tree_settings.cc |
| @@ -36,12 +36,6 @@ LayerTreeSettings::LayerTreeSettings() |
| , maxUntiledLayerSize(gfx::Size(512, 512)) |
| , minimumOcclusionTrackingSize(gfx::Size(160, 160)) |
| { |
| - // TODO(danakj): Move this to chromium when we don't go through the WebKit API anymore. |
| - compositorFrameMessage = CommandLine::ForCurrentProcess()->HasSwitch(cc::switches::kEnableCompositorFrameMessage); |
| - partialSwapEnabled = CommandLine::ForCurrentProcess()->HasSwitch(switches::kEnablePartialSwap); |
| - backgroundColorInsteadOfCheckerboard = CommandLine::ForCurrentProcess()->HasSwitch(switches::kBackgroundColorInsteadOfCheckerboard); |
| - showOverdrawInTracing = CommandLine::ForCurrentProcess()->HasSwitch(switches::kTraceOverdraw); |
| - |
| // TODO(alokp): Remove this hard-coded setting. |
| // Platforms that need to disable LCD text must explicitly set this value. |
| #if defined(OS_ANDROID) |
| @@ -58,18 +52,26 @@ LayerTreeSettings::LayerTreeSettings() |
| useLinearFadeScrollbarAnimator = true; |
| #endif |
| - initialDebugState.showPropertyChangedRects = CommandLine::ForCurrentProcess()->HasSwitch(cc::switches::kShowPropertyChangedRects); |
| - initialDebugState.showSurfaceDamageRects = CommandLine::ForCurrentProcess()->HasSwitch(cc::switches::kShowSurfaceDamageRects); |
| - initialDebugState.showScreenSpaceRects = CommandLine::ForCurrentProcess()->HasSwitch(cc::switches::kShowScreenSpaceRects); |
| - initialDebugState.showReplicaScreenSpaceRects = CommandLine::ForCurrentProcess()->HasSwitch(cc::switches::kShowReplicaScreenSpaceRects); |
| - initialDebugState.showOccludingRects = CommandLine::ForCurrentProcess()->HasSwitch(cc::switches::kShowOccludingRects); |
| - initialDebugState.showNonOccludingRects = CommandLine::ForCurrentProcess()->HasSwitch(cc::switches::kShowNonOccludingRects); |
| + CommandLine* command_line = CommandLine::ForCurrentProcess(); |
| + |
| + // TODO(danakj): Move this to chromium when we don't go through the WebKit API anymore. |
| + compositorFrameMessage = command_line->HasSwitch(cc::switches::kEnableCompositorFrameMessage); |
| + partialSwapEnabled = command_line->HasSwitch(switches::kEnablePartialSwap); |
| + backgroundColorInsteadOfCheckerboard = command_line->HasSwitch(switches::kBackgroundColorInsteadOfCheckerboard); |
| + showOverdrawInTracing = command_line->HasSwitch(switches::kTraceOverdraw); |
| + |
| + initialDebugState.showPropertyChangedRects = command_line->HasSwitch(cc::switches::kShowPropertyChangedRects); |
| + initialDebugState.showSurfaceDamageRects = command_line->HasSwitch(cc::switches::kShowSurfaceDamageRects); |
| + initialDebugState.showScreenSpaceRects = command_line->HasSwitch(cc::switches::kShowScreenSpaceRects); |
| + initialDebugState.showReplicaScreenSpaceRects = command_line->HasSwitch(cc::switches::kShowReplicaScreenSpaceRects); |
| + initialDebugState.showOccludingRects = command_line->HasSwitch(cc::switches::kShowOccludingRects); |
| + initialDebugState.showNonOccludingRects = command_line->HasSwitch(cc::switches::kShowNonOccludingRects); |
| - if (CommandLine::ForCurrentProcess()->HasSwitch( |
|
nduca
2013/01/15 01:54:54
i'm confused about the code movement here, whats t
brianderson
2013/01/15 02:01:56
I should undo this. At some point, I was adding a
|
| + if (command_line->HasSwitch( |
| switches::kNumRasterThreads)) { |
| const size_t kMaxRasterThreads = 64; |
| std::string num_raster_threads = |
| - CommandLine::ForCurrentProcess()->GetSwitchValueASCII( |
| + command_line->GetSwitchValueASCII( |
| switches::kNumRasterThreads); |
| int num_threads; |
| if (base::StringToInt(num_raster_threads, &num_threads) && |