| Index: cc/trees/layer_tree.cc
|
| diff --git a/cc/trees/layer_tree.cc b/cc/trees/layer_tree.cc
|
| index 95fbf5084780922a29b88460b39c5181f8f37ae8..2b9c73be54f1c57157ab25dc70534b9fc947808f 100644
|
| --- a/cc/trees/layer_tree.cc
|
| +++ b/cc/trees/layer_tree.cc
|
| @@ -50,6 +50,7 @@ LayerTree::Inputs::Inputs()
|
| device_scale_factor(1.f),
|
| painted_device_scale_factor(1.f),
|
| page_scale_factor(1.f),
|
| + subframe_page_scale_factor(1.f),
|
| min_page_scale_factor(1.f),
|
| max_page_scale_factor(1.f),
|
| background_color(SK_ColorWHITE),
|
| @@ -199,6 +200,14 @@ void LayerTree::SetPageScaleFactorAndLimits(float page_scale_factor,
|
| SetNeedsCommit();
|
| }
|
|
|
| +void LayerTree::SetSubframePageScaleFactor(float subframe_page_scale_factor) {
|
| + if (inputs_.subframe_page_scale_factor == subframe_page_scale_factor)
|
| + return;
|
| +
|
| + inputs_.subframe_page_scale_factor = subframe_page_scale_factor;
|
| + SetNeedsDisplayOnAllLayers();
|
| +}
|
| +
|
| void LayerTree::StartPageScaleAnimation(const gfx::Vector2d& target_offset,
|
| bool use_anchor,
|
| float scale,
|
| @@ -400,9 +409,9 @@ void LayerTree::PushPropertiesTo(LayerTreeImpl* tree_impl) {
|
| // Setting property trees must happen before pushing the page scale.
|
| tree_impl->SetPropertyTrees(&property_trees_);
|
|
|
| - tree_impl->PushPageScaleFromMainThread(inputs_.page_scale_factor,
|
| - inputs_.min_page_scale_factor,
|
| - inputs_.max_page_scale_factor);
|
| + tree_impl->PushPageScaleFromMainThread(
|
| + inputs_.page_scale_factor, inputs_.subframe_page_scale_factor,
|
| + inputs_.min_page_scale_factor, inputs_.max_page_scale_factor);
|
|
|
| tree_impl->set_browser_controls_shrink_blink_size(
|
| inputs_.browser_controls_shrink_blink_size);
|
| @@ -462,6 +471,7 @@ void LayerTree::ToProtobuf(proto::LayerTree* proto, bool inputs_only) {
|
| proto->set_device_scale_factor(inputs_.device_scale_factor);
|
| proto->set_painted_device_scale_factor(inputs_.painted_device_scale_factor);
|
| proto->set_page_scale_factor(inputs_.page_scale_factor);
|
| + proto->set_subframe_page_scale_factor(inputs_.subframe_page_scale_factor);
|
| proto->set_min_page_scale_factor(inputs_.min_page_scale_factor);
|
| proto->set_max_page_scale_factor(inputs_.max_page_scale_factor);
|
|
|
| @@ -533,6 +543,7 @@ void LayerTree::FromProtobuf(const proto::LayerTree& proto) {
|
| inputs_.device_scale_factor = proto.device_scale_factor();
|
| inputs_.painted_device_scale_factor = proto.painted_device_scale_factor();
|
| inputs_.page_scale_factor = proto.page_scale_factor();
|
| + inputs_.subframe_page_scale_factor = proto.subframe_page_scale_factor();
|
| inputs_.min_page_scale_factor = proto.min_page_scale_factor();
|
| inputs_.max_page_scale_factor = proto.max_page_scale_factor();
|
| inputs_.background_color = proto.background_color();
|
|
|