| OLD | NEW |
| 1 // Copyright 2011 The Chromium Authors. All rights reserved. | 1 // Copyright 2011 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "cc/trees/layer_tree_host_common.h" | 5 #include "cc/trees/layer_tree_host_common.h" |
| 6 | 6 |
| 7 #include <stddef.h> | 7 #include <stddef.h> |
| 8 | 8 |
| 9 #include <algorithm> | 9 #include <algorithm> |
| 10 | 10 |
| (...skipping 190 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 201 proto->set_layer_id(layer_id); | 201 proto->set_layer_id(layer_id); |
| 202 proto->set_hidden(hidden); | 202 proto->set_hidden(hidden); |
| 203 } | 203 } |
| 204 | 204 |
| 205 void LayerTreeHostCommon::ScrollbarsUpdateInfo::FromProtobuf( | 205 void LayerTreeHostCommon::ScrollbarsUpdateInfo::FromProtobuf( |
| 206 const proto::ScrollbarsUpdateInfo& proto) { | 206 const proto::ScrollbarsUpdateInfo& proto) { |
| 207 layer_id = proto.layer_id(); | 207 layer_id = proto.layer_id(); |
| 208 hidden = proto.hidden(); | 208 hidden = proto.hidden(); |
| 209 } | 209 } |
| 210 | 210 |
| 211 ReflectedMainFrameState::ReflectedMainFrameState() : page_scale_delta(1.0f) {} |
| 212 |
| 213 ReflectedMainFrameState::~ReflectedMainFrameState() = default; |
| 214 |
| 211 ScrollAndScaleSet::ScrollAndScaleSet() | 215 ScrollAndScaleSet::ScrollAndScaleSet() |
| 212 : page_scale_delta(1.f), top_controls_delta(0.f) { | 216 : page_scale_delta(1.f), top_controls_delta(0.f) { |
| 213 } | 217 } |
| 214 | 218 |
| 215 ScrollAndScaleSet::~ScrollAndScaleSet() {} | 219 ScrollAndScaleSet::~ScrollAndScaleSet() {} |
| 216 | 220 |
| 217 bool ScrollAndScaleSet::EqualsForTesting(const ScrollAndScaleSet& other) const { | 221 bool ScrollAndScaleSet::EqualsForTesting(const ScrollAndScaleSet& other) const { |
| 218 return scrolls == other.scrolls && | 222 return scrolls == other.scrolls && |
| 219 page_scale_delta == other.page_scale_delta && | 223 page_scale_delta == other.page_scale_delta && |
| 220 elastic_overscroll_delta == other.elastic_overscroll_delta && | 224 elastic_overscroll_delta == other.elastic_overscroll_delta && |
| (...skipping 512 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 733 | 737 |
| 734 PropertyTrees* GetPropertyTrees(Layer* layer) { | 738 PropertyTrees* GetPropertyTrees(Layer* layer) { |
| 735 return layer->GetLayerTree()->property_trees(); | 739 return layer->GetLayerTree()->property_trees(); |
| 736 } | 740 } |
| 737 | 741 |
| 738 PropertyTrees* GetPropertyTrees(LayerImpl* layer) { | 742 PropertyTrees* GetPropertyTrees(LayerImpl* layer) { |
| 739 return layer->layer_tree_impl()->property_trees(); | 743 return layer->layer_tree_impl()->property_trees(); |
| 740 } | 744 } |
| 741 | 745 |
| 742 } // namespace cc | 746 } // namespace cc |
| OLD | NEW |