| 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 166 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 177 proto->set_layer_id(layer_id); | 177 proto->set_layer_id(layer_id); |
| 178 Vector2dToProto(scroll_delta, proto->mutable_scroll_delta()); | 178 Vector2dToProto(scroll_delta, proto->mutable_scroll_delta()); |
| 179 } | 179 } |
| 180 | 180 |
| 181 void LayerTreeHostCommon::ScrollUpdateInfo::FromProtobuf( | 181 void LayerTreeHostCommon::ScrollUpdateInfo::FromProtobuf( |
| 182 const proto::ScrollUpdateInfo& proto) { | 182 const proto::ScrollUpdateInfo& proto) { |
| 183 layer_id = proto.layer_id(); | 183 layer_id = proto.layer_id(); |
| 184 scroll_delta = ProtoToVector2d(proto.scroll_delta()); | 184 scroll_delta = ProtoToVector2d(proto.scroll_delta()); |
| 185 } | 185 } |
| 186 | 186 |
| 187 ReflectedMainFrameState::ReflectedMainFrameState() : page_scale_delta(1.0f) {} |
| 188 |
| 189 ReflectedMainFrameState::~ReflectedMainFrameState() = default; |
| 190 |
| 187 ScrollAndScaleSet::ScrollAndScaleSet() | 191 ScrollAndScaleSet::ScrollAndScaleSet() |
| 188 : page_scale_delta(1.f), top_controls_delta(0.f) { | 192 : page_scale_delta(1.f), top_controls_delta(0.f) { |
| 189 } | 193 } |
| 190 | 194 |
| 191 ScrollAndScaleSet::~ScrollAndScaleSet() {} | 195 ScrollAndScaleSet::~ScrollAndScaleSet() {} |
| 192 | 196 |
| 193 bool ScrollAndScaleSet::EqualsForTesting(const ScrollAndScaleSet& other) const { | 197 bool ScrollAndScaleSet::EqualsForTesting(const ScrollAndScaleSet& other) const { |
| 194 return scrolls == other.scrolls && | 198 return scrolls == other.scrolls && |
| 195 page_scale_delta == other.page_scale_delta && | 199 page_scale_delta == other.page_scale_delta && |
| 196 elastic_overscroll_delta == other.elastic_overscroll_delta && | 200 elastic_overscroll_delta == other.elastic_overscroll_delta && |
| (...skipping 510 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 707 | 711 |
| 708 PropertyTrees* GetPropertyTrees(Layer* layer) { | 712 PropertyTrees* GetPropertyTrees(Layer* layer) { |
| 709 return layer->GetLayerTree()->property_trees(); | 713 return layer->GetLayerTree()->property_trees(); |
| 710 } | 714 } |
| 711 | 715 |
| 712 PropertyTrees* GetPropertyTrees(LayerImpl* layer) { | 716 PropertyTrees* GetPropertyTrees(LayerImpl* layer) { |
| 713 return layer->layer_tree_impl()->property_trees(); | 717 return layer->layer_tree_impl()->property_trees(); |
| 714 } | 718 } |
| 715 | 719 |
| 716 } // namespace cc | 720 } // namespace cc |
| OLD | NEW |