summaryrefslogtreecommitdiffstats
path: root/cc/layer_tree_settings.cc
diff options
context:
space:
mode:
authordanakj@chromium.org <danakj@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-02-09 05:58:58 +0000
committerdanakj@chromium.org <danakj@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-02-09 05:58:58 +0000
commit5edc5b9409e6e50a86c1103524c4d6cb3588b275 (patch)
treea08d54b63383ec8498a876d8e77aa1b3285f47dc /cc/layer_tree_settings.cc
parentc98809204d3b0ccd9af0a3269fba9e737321277e (diff)
downloadchromium_src-5edc5b9409e6e50a86c1103524c4d6cb3588b275.zip
chromium_src-5edc5b9409e6e50a86c1103524c4d6cb3588b275.tar.gz
chromium_src-5edc5b9409e6e50a86c1103524c4d6cb3588b275.tar.bz2
cc: Move command-line and platform-specific settings.
The cc/ directory should not be reading the command line for settings since different embedders in the same process may want to use different settings. This moves any logic to change settings based on the command line or platform out to RenderWidgetCompositor in content/ so that they will only apply to the renderer compositor. The ui compositor already provides its desired settings on the LayerTreeSettings object it passes to cc/. The command-line flag settings set by WebLayerTreeViewImpl are no longer needed as only settings that can be changed by DRT need to be there, and those are provided via the WebLayerTreeView::Settings struct. R=jamesr BUG=175031 Review URL: https://chromiumcodereview.appspot.com/12209065 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@181601 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'cc/layer_tree_settings.cc')
-rw-r--r--cc/layer_tree_settings.cc52
1 files changed, 0 insertions, 52 deletions
diff --git a/cc/layer_tree_settings.cc b/cc/layer_tree_settings.cc
index f350943..ab12f19 100644
--- a/cc/layer_tree_settings.cc
+++ b/cc/layer_tree_settings.cc
@@ -40,58 +40,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)
- canUseLCDText = false;
-#endif
-
-#if defined(OS_ANDROID)
- // TODO(danakj): Move this out to the android code.
- maxPartialTextureUpdates = 0;
-#endif
-
-#if defined(OS_ANDROID)
- // TODO(danakj): Move this out to the android code.
- 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);
- if (CommandLine::ForCurrentProcess()->HasSwitch(cc::switches::kSlowDownRasterScaleFactor)) {
- int scaleAsInt;
- std::string value = CommandLine::ForCurrentProcess()->GetSwitchValueASCII(switches::kSlowDownRasterScaleFactor);
- if (!base::StringToInt(value, &scaleAsInt))
- LOG(ERROR) << "Failed to parse the slow down raster scale factor:" << value;
- else
- initialDebugState.slowDownRasterScaleFactor = scaleAsInt;
- }
-
- if (CommandLine::ForCurrentProcess()->HasSwitch(
- switches::kNumRasterThreads)) {
- const size_t kMaxRasterThreads = 64;
- std::string num_raster_threads =
- CommandLine::ForCurrentProcess()->GetSwitchValueASCII(
- switches::kNumRasterThreads);
- int num_threads;
- if (base::StringToInt(num_raster_threads, &num_threads) &&
- num_threads > 0 && num_threads <= kMaxRasterThreads) {
- numRasterThreads = num_threads;
- } else {
- LOG(WARNING) << "Bad number of raster threads: " <<
- num_raster_threads;
- }
- }
}
LayerTreeSettings::~LayerTreeSettings()