diff options
author | tedchoc@chromium.org <tedchoc@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-02-01 05:47:30 +0000 |
---|---|---|
committer | tedchoc@chromium.org <tedchoc@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-02-01 05:47:30 +0000 |
commit | c4ce488945d73a7d0ab4668e640421bb3a0367e9 (patch) | |
tree | 2296c1736933f5fd2a8f15874721ffb2b762d3ed /cc | |
parent | d2ca75c9c62bf41a3a10811d13df0f72062d98df (diff) | |
download | chromium_src-c4ce488945d73a7d0ab4668e640421bb3a0367e9.zip chromium_src-c4ce488945d73a7d0ab4668e640421bb3a0367e9.tar.gz chromium_src-c4ce488945d73a7d0ab4668e640421bb3a0367e9.tar.bz2 |
Convert top controls to use DIP instead of PX.
Previously, scroll offset was based on screen pixels, but now
is based on screen density independent pixels. This converts
the top controls manager to deal in DIP instead of PX.
BUG=161303
Review URL: https://chromiumcodereview.appspot.com/12095071
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@180089 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'cc')
-rw-r--r-- | cc/layer_tree_host_impl.cc | 2 | ||||
-rw-r--r-- | cc/layer_tree_settings.cc | 2 | ||||
-rw-r--r-- | cc/layer_tree_settings.h | 2 | ||||
-rw-r--r-- | cc/switches.cc | 2 |
4 files changed, 4 insertions, 4 deletions
diff --git a/cc/layer_tree_host_impl.cc b/cc/layer_tree_host_impl.cc index c588a00..e846f1d 100644 --- a/cc/layer_tree_host_impl.cc +++ b/cc/layer_tree_host_impl.cc @@ -162,7 +162,7 @@ LayerTreeHostImpl::LayerTreeHostImpl(const LayerTreeSettings& settings, LayerTre didVisibilityChange(this, m_visible); if (settings.calculateTopControlsPosition) - m_topControlsManager = TopControlsManager::Create(this, settings.topControlsHeightPx); + m_topControlsManager = TopControlsManager::Create(this, settings.topControlsHeight); // LTHI always has an active tree. m_activeTree = LayerTreeImpl::create(this); diff --git a/cc/layer_tree_settings.cc b/cc/layer_tree_settings.cc index 9cda4cb..601836b 100644 --- a/cc/layer_tree_settings.cc +++ b/cc/layer_tree_settings.cc @@ -31,10 +31,10 @@ LayerTreeSettings::LayerTreeSettings() , calculateTopControlsPosition(false) , minimumContentsScale(0.0625f) , lowResContentsScaleFactor(0.125f) + , topControlsHeight(0.f) , refreshRate(0) , maxPartialTextureUpdates(std::numeric_limits<size_t>::max()) , numRasterThreads(1) - , topControlsHeightPx(0) , defaultTileSize(gfx::Size(256, 256)) , maxUntiledLayerSize(gfx::Size(512, 512)) , minimumOcclusionTrackingSize(gfx::Size(160, 160)) diff --git a/cc/layer_tree_settings.h b/cc/layer_tree_settings.h index 28bcdaa..dc086fe 100644 --- a/cc/layer_tree_settings.h +++ b/cc/layer_tree_settings.h @@ -34,10 +34,10 @@ class CC_EXPORT LayerTreeSettings { bool calculateTopControlsPosition; float minimumContentsScale; float lowResContentsScaleFactor; + float topControlsHeight; double refreshRate; size_t maxPartialTextureUpdates; size_t numRasterThreads; - int topControlsHeightPx; gfx::Size defaultTileSize; gfx::Size maxUntiledLayerSize; gfx::Size minimumOcclusionTrackingSize; diff --git a/cc/switches.cc b/cc/switches.cc index 6cb24d7..c116d7e 100644 --- a/cc/switches.cc +++ b/cc/switches.cc @@ -30,7 +30,7 @@ const char kEnableRightAlignedScheduling[] = "enable-right-aligned-scheduling"; const char kEnableTopControlsPositionCalculation[] = "enable-top-controls-position-calculation"; -// The height of the movable top controls in screen pixels. +// The height of the movable top controls. const char kTopControlsHeight[] = "top-controls-height"; // Number of worker threads used to rasterize content. |