Index: cc/trees/layer_tree_host.cc |
diff --git a/cc/trees/layer_tree_host.cc b/cc/trees/layer_tree_host.cc |
index 1a5177112af55d73bff1637492a1cb89cfcb4c05..c69db831001b9d4b73912066b014494317194e5c 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_(0.f), |
danakj
2015/10/22 23:15:29
default to 1?
oshima
2015/10/23 18:05:36
I was using 0.f as a way to tell if which should b
|
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->SetPaintedDeviceScaleFactor(painted_device_scale_factor_); |
host_impl->SetDebugState(debug_state_); |
if (pending_page_scale_animation_) { |
sync_tree->SetPendingPageScaleAnimation( |
@@ -588,7 +590,6 @@ void LayerTreeHost::SetHasGpuRasterizationTrigger(bool has_trigger) { |
void LayerTreeHost::SetViewportSize(const gfx::Size& device_viewport_size) { |
if (device_viewport_size == device_viewport_size_) |
return; |
- |
danakj
2015/10/22 23:15:29
unrelated change
oshima
2015/10/23 18:05:36
Done.
|
device_viewport_size_ = device_viewport_size; |
SetPropertyTreesNeedRebuild(); |
@@ -871,6 +872,16 @@ 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; |
+ |
+ property_trees_.needs_rebuild = true; |
danakj
2015/10/22 23:15:29
i don't think this is true, it's not used in prope
oshima
2015/10/23 18:05:36
Done.
|
+ SetNeedsCommit(); |
+} |
+ |
void LayerTreeHost::UpdateTopControlsState(TopControlsState constraints, |
TopControlsState current, |
bool animate) { |