Index: cc/trees/layer_tree_host.cc |
diff --git a/cc/trees/layer_tree_host.cc b/cc/trees/layer_tree_host.cc |
index 7641fe87c0dc5438a52abf004e799f968077b83f..20a09064909fc38abbbce1e748486b5ecef7c892 100644 |
--- a/cc/trees/layer_tree_host.cc |
+++ b/cc/trees/layer_tree_host.cc |
@@ -99,6 +99,7 @@ LayerTreeHost::LayerTreeHost(InitParams* params) |
top_controls_height_(0.f), |
top_controls_shown_ratio_(0.f), |
device_scale_factor_(1.f), |
+ painted_device_scale_factor_(1.f), |
visible_(false), |
page_scale_factor_(1.f), |
min_page_scale_factor_(1.f), |
@@ -311,6 +312,7 @@ void LayerTreeHost::FinishCommitOnImplThread(LayerTreeHostImpl* host_impl) { |
// properties are set, since those trigger an update of GPU rasterization |
// status, which depends on the device scale factor. (crbug.com/535700) |
sync_tree->SetDeviceScaleFactor(device_scale_factor_); |
+ sync_tree->set_painted_device_scale_factor(painted_device_scale_factor_); |
host_impl->SetDebugState(debug_state_); |
if (pending_page_scale_animation_) { |
sync_tree->SetPendingPageScaleAnimation( |
@@ -871,6 +873,15 @@ void LayerTreeHost::SetDeviceScaleFactor(float device_scale_factor) { |
SetNeedsCommit(); |
} |
+void LayerTreeHost::SetPaintedDeviceScaleFactor( |
+ float painted_device_scale_factor) { |
+ if (painted_device_scale_factor == painted_device_scale_factor_) |
+ return; |
+ painted_device_scale_factor_ = painted_device_scale_factor; |
+ |
+ SetNeedsCommit(); |
+} |
+ |
void LayerTreeHost::UpdateTopControlsState(TopControlsState constraints, |
TopControlsState current, |
bool animate) { |