| 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 141 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 152 } | 152 } |
| 153 | 153 |
| 154 void LayerTreeHostCommon::ScrollUpdateInfo::FromProtobuf( | 154 void LayerTreeHostCommon::ScrollUpdateInfo::FromProtobuf( |
| 155 const proto::ScrollUpdateInfo& proto) { | 155 const proto::ScrollUpdateInfo& proto) { |
| 156 layer_id = proto.layer_id(); | 156 layer_id = proto.layer_id(); |
| 157 scroll_delta = ProtoToVector2d(proto.scroll_delta()); | 157 scroll_delta = ProtoToVector2d(proto.scroll_delta()); |
| 158 } | 158 } |
| 159 | 159 |
| 160 ScrollAndScaleSet::ScrollAndScaleSet() | 160 ScrollAndScaleSet::ScrollAndScaleSet() |
| 161 : page_scale_delta(1.f), top_controls_delta(0.f) { | 161 : page_scale_delta(1.f), top_controls_delta(0.f) { |
| 162 inner_viewport_scroll.layer_id = Layer::INVALID_ID; |
| 162 } | 163 } |
| 163 | 164 |
| 164 ScrollAndScaleSet::~ScrollAndScaleSet() {} | 165 ScrollAndScaleSet::~ScrollAndScaleSet() {} |
| 165 | 166 |
| 166 bool ScrollAndScaleSet::EqualsForTesting(const ScrollAndScaleSet& other) const { | 167 bool ScrollAndScaleSet::EqualsForTesting(const ScrollAndScaleSet& other) const { |
| 167 return scrolls == other.scrolls && | 168 return scrolls == other.scrolls && |
| 168 page_scale_delta == other.page_scale_delta && | 169 page_scale_delta == other.page_scale_delta && |
| 169 elastic_overscroll_delta == other.elastic_overscroll_delta && | 170 elastic_overscroll_delta == other.elastic_overscroll_delta && |
| 170 top_controls_delta == other.top_controls_delta; | 171 top_controls_delta == other.top_controls_delta; |
| 171 } | 172 } |
| (...skipping 517 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 689 | 690 |
| 690 PropertyTrees* GetPropertyTrees(Layer* layer) { | 691 PropertyTrees* GetPropertyTrees(Layer* layer) { |
| 691 return layer->layer_tree_host()->property_trees(); | 692 return layer->layer_tree_host()->property_trees(); |
| 692 } | 693 } |
| 693 | 694 |
| 694 PropertyTrees* GetPropertyTrees(LayerImpl* layer) { | 695 PropertyTrees* GetPropertyTrees(LayerImpl* layer) { |
| 695 return layer->layer_tree_impl()->property_trees(); | 696 return layer->layer_tree_impl()->property_trees(); |
| 696 } | 697 } |
| 697 | 698 |
| 698 } // namespace cc | 699 } // namespace cc |
| OLD | NEW |