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 162 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
173 LayerTreeHostCommon::ScrollbarsUpdateInfo::ScrollbarsUpdateInfo(int layer_id, | 173 LayerTreeHostCommon::ScrollbarsUpdateInfo::ScrollbarsUpdateInfo(int layer_id, |
174 bool hidden) | 174 bool hidden) |
175 : layer_id(layer_id), hidden(hidden) {} | 175 : layer_id(layer_id), hidden(hidden) {} |
176 | 176 |
177 bool LayerTreeHostCommon::ScrollbarsUpdateInfo::operator==( | 177 bool LayerTreeHostCommon::ScrollbarsUpdateInfo::operator==( |
178 const LayerTreeHostCommon::ScrollbarsUpdateInfo& other) const { | 178 const LayerTreeHostCommon::ScrollbarsUpdateInfo& other) const { |
179 return layer_id == other.layer_id && hidden == other.hidden; | 179 return layer_id == other.layer_id && hidden == other.hidden; |
180 } | 180 } |
181 | 181 |
182 ScrollAndScaleSet::ScrollAndScaleSet() | 182 ScrollAndScaleSet::ScrollAndScaleSet() |
183 : page_scale_delta(1.f), top_controls_delta(0.f) { | 183 : page_scale_delta(1.f), |
184 } | 184 top_controls_delta(0.f), |
| 185 has_scrolled_by_wheel(false), |
| 186 has_scrolled_by_touch(false) {} |
185 | 187 |
186 ScrollAndScaleSet::~ScrollAndScaleSet() {} | 188 ScrollAndScaleSet::~ScrollAndScaleSet() {} |
187 | 189 |
188 static inline void SetMaskLayersAreDrawnRenderSurfaceLayerListMembers( | 190 static inline void SetMaskLayersAreDrawnRenderSurfaceLayerListMembers( |
189 RenderSurfaceImpl* surface, | 191 RenderSurfaceImpl* surface, |
190 PropertyTrees* property_trees) { | 192 PropertyTrees* property_trees) { |
191 LayerImpl* mask_layer = surface->MaskLayer(); | 193 LayerImpl* mask_layer = surface->MaskLayer(); |
192 if (mask_layer) { | 194 if (mask_layer) { |
193 mask_layer->set_is_drawn_render_surface_layer_list_member(true); | 195 mask_layer->set_is_drawn_render_surface_layer_list_member(true); |
194 draw_property_utils::ComputeMaskDrawProperties(mask_layer, property_trees); | 196 draw_property_utils::ComputeMaskDrawProperties(mask_layer, property_trees); |
(...skipping 449 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
644 | 646 |
645 PropertyTrees* GetPropertyTrees(Layer* layer) { | 647 PropertyTrees* GetPropertyTrees(Layer* layer) { |
646 return layer->layer_tree_host()->property_trees(); | 648 return layer->layer_tree_host()->property_trees(); |
647 } | 649 } |
648 | 650 |
649 PropertyTrees* GetPropertyTrees(LayerImpl* layer) { | 651 PropertyTrees* GetPropertyTrees(LayerImpl* layer) { |
650 return layer->layer_tree_impl()->property_trees(); | 652 return layer->layer_tree_impl()->property_trees(); |
651 } | 653 } |
652 | 654 |
653 } // namespace cc | 655 } // namespace cc |
OLD | NEW |