| Index: cc/layer_tree_settings.cc
|
| diff --git a/cc/layer_tree_settings.cc b/cc/layer_tree_settings.cc
|
| index 4221167c29fa139a0ed67d473ea6deccda6bc79e..8eba4f606097c452e2dba547b4ff2d0bc7008cf9 100644
|
| --- a/cc/layer_tree_settings.cc
|
| +++ b/cc/layer_tree_settings.cc
|
| @@ -26,9 +26,11 @@ LayerTreeSettings::LayerTreeSettings()
|
| , showOverdrawInTracing(false)
|
| , canUseLCDText(true)
|
| , shouldClearRootRenderPass(true)
|
| + , calculateTopControlsPosition(false)
|
| , refreshRate(0)
|
| , maxPartialTextureUpdates(std::numeric_limits<size_t>::max())
|
| , numRasterThreads(1)
|
| + , topControlsHeight(0)
|
| , defaultTileSize(gfx::Size(256, 256))
|
| , maxUntiledLayerSize(gfx::Size(512, 512))
|
| , minimumOcclusionTrackingSize(gfx::Size(160, 160))
|
| @@ -40,6 +42,19 @@ LayerTreeSettings::LayerTreeSettings()
|
| backgroundColorInsteadOfCheckerboard = CommandLine::ForCurrentProcess()->HasSwitch(switches::kBackgroundColorInsteadOfCheckerboard);
|
| showOverdrawInTracing = CommandLine::ForCurrentProcess()->HasSwitch(switches::kTraceOverdraw);
|
|
|
| + calculateTopControlsPosition = CommandLine::ForCurrentProcess()->HasSwitch(switches::kEnableTopControlsPositionCalculation);
|
| + if (CommandLine::ForCurrentProcess()->HasSwitch(switches::kTopControlsHeight)) {
|
| + std::string controls_height_str =
|
| + CommandLine::ForCurrentProcess()->GetSwitchValueASCII(switches::kTopControlsHeight);
|
| + int controls_height;
|
| + if (base::StringToInt(controls_height_str, &controls_height) && controls_height > 0)
|
| + topControlsHeight = controls_height;
|
| + }
|
| + if (calculateTopControlsPosition && (topControlsHeight <= 0 || !compositorFrameMessage)) {
|
| + DCHECK(false) << "Top controls repositioning enabled without valid height or compositorFrameMessage set.";
|
| + calculateTopControlsPosition = false;
|
| + }
|
| +
|
| // TODO(alokp): Remove this hard-coded setting.
|
| // Platforms that need to disable LCD text must explicitly set this value.
|
| #if defined(OS_ANDROID)
|
|
|