Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(497)

Side by Side Diff: cc/trees/layer_tree_host_common.cc

Issue 2816063003: Replace layer id with Element id for tracking scrollbar animation controllers (Closed)
Patch Set: Address reviewer comments, pull element_id.h change to another patch Created 3 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 146 matching lines...) Expand 10 before | Expand all | Expand 10 after
157 157
158 LayerTreeHostCommon::ScrollUpdateInfo::ScrollUpdateInfo() 158 LayerTreeHostCommon::ScrollUpdateInfo::ScrollUpdateInfo()
159 : layer_id(Layer::INVALID_ID) {} 159 : layer_id(Layer::INVALID_ID) {}
160 160
161 bool LayerTreeHostCommon::ScrollUpdateInfo::operator==( 161 bool LayerTreeHostCommon::ScrollUpdateInfo::operator==(
162 const LayerTreeHostCommon::ScrollUpdateInfo& other) const { 162 const LayerTreeHostCommon::ScrollUpdateInfo& other) const {
163 return layer_id == other.layer_id && scroll_delta == other.scroll_delta; 163 return layer_id == other.layer_id && scroll_delta == other.scroll_delta;
164 } 164 }
165 165
166 LayerTreeHostCommon::ScrollbarsUpdateInfo::ScrollbarsUpdateInfo() 166 LayerTreeHostCommon::ScrollbarsUpdateInfo::ScrollbarsUpdateInfo()
167 : layer_id(Layer::INVALID_ID), hidden(true) {} 167 : element_id(), hidden(true) {}
168 168
169 LayerTreeHostCommon::ScrollbarsUpdateInfo::ScrollbarsUpdateInfo(int layer_id, 169 LayerTreeHostCommon::ScrollbarsUpdateInfo::ScrollbarsUpdateInfo(ElementId id,
170 bool hidden) 170 bool hidden)
171 : layer_id(layer_id), hidden(hidden) {} 171 : element_id(id), hidden(hidden) {}
172 172
173 bool LayerTreeHostCommon::ScrollbarsUpdateInfo::operator==( 173 bool LayerTreeHostCommon::ScrollbarsUpdateInfo::operator==(
174 const LayerTreeHostCommon::ScrollbarsUpdateInfo& other) const { 174 const LayerTreeHostCommon::ScrollbarsUpdateInfo& other) const {
175 return layer_id == other.layer_id && hidden == other.hidden; 175 return element_id == other.element_id && hidden == other.hidden;
176 } 176 }
177 177
178 ScrollAndScaleSet::ScrollAndScaleSet() 178 ScrollAndScaleSet::ScrollAndScaleSet()
179 : page_scale_delta(1.f), 179 : page_scale_delta(1.f),
180 top_controls_delta(0.f), 180 top_controls_delta(0.f),
181 has_scrolled_by_wheel(false), 181 has_scrolled_by_wheel(false),
182 has_scrolled_by_touch(false) {} 182 has_scrolled_by_touch(false) {}
183 183
184 ScrollAndScaleSet::~ScrollAndScaleSet() {} 184 ScrollAndScaleSet::~ScrollAndScaleSet() {}
185 185
(...skipping 454 matching lines...) Expand 10 before | Expand all | Expand 10 after
640 640
641 PropertyTrees* GetPropertyTrees(Layer* layer) { 641 PropertyTrees* GetPropertyTrees(Layer* layer) {
642 return layer->layer_tree_host()->property_trees(); 642 return layer->layer_tree_host()->property_trees();
643 } 643 }
644 644
645 PropertyTrees* GetPropertyTrees(LayerImpl* layer) { 645 PropertyTrees* GetPropertyTrees(LayerImpl* layer) {
646 return layer->layer_tree_impl()->property_trees(); 646 return layer->layer_tree_impl()->property_trees();
647 } 647 }
648 648
649 } // namespace cc 649 } // namespace cc
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698