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

Unified Diff: cc/trees/layer_tree_host_impl.cc

Issue 15688002: Part 1/3 (compositor) of adding with device scale factor to transport surfaces (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Update Android build Created 7 years, 7 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « cc/trees/layer_tree_host_impl.h ('k') | cc/trees/layer_tree_host_impl_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/trees/layer_tree_host_impl.cc
diff --git a/cc/trees/layer_tree_host_impl.cc b/cc/trees/layer_tree_host_impl.cc
index 8dec2f463b43ad57c89ee5f59b4c2e057c0ce799..b35425a9a77e81901eeca984e54007fc20f146a9 100644
--- a/cc/trees/layer_tree_host_impl.cc
+++ b/cc/trees/layer_tree_host_impl.cc
@@ -1205,6 +1205,10 @@ gfx::Size LayerTreeHostImpl::DeviceViewportSize() const {
return device_viewport_size();
}
+float LayerTreeHostImpl::DeviceScaleFactor() const {
+ return device_scale_factor_;
+}
+
gfx::SizeF LayerTreeHostImpl::VisibleViewportSize() const {
gfx::SizeF dip_size =
gfx::ScaleSize(DeviceViewportSize(), 1.f / device_scale_factor());
@@ -1510,6 +1514,9 @@ void LayerTreeHostImpl::SetDeviceScaleFactor(float device_scale_factor) {
return;
device_scale_factor_ = device_scale_factor;
+ if (renderer_)
+ renderer_->ViewportChanged();
+
UpdateMaxScrollOffset();
SetFullRootLayerDamage();
}
« no previous file with comments | « cc/trees/layer_tree_host_impl.h ('k') | cc/trees/layer_tree_host_impl_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698