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

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: Update element_id comment, some cleanups per reviewer comments 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 149 matching lines...) Expand 10 before | Expand all | Expand 10 after
160 160
161 LayerTreeHostCommon::ScrollUpdateInfo::ScrollUpdateInfo() 161 LayerTreeHostCommon::ScrollUpdateInfo::ScrollUpdateInfo()
162 : layer_id(Layer::INVALID_ID) {} 162 : layer_id(Layer::INVALID_ID) {}
163 163
164 bool LayerTreeHostCommon::ScrollUpdateInfo::operator==( 164 bool LayerTreeHostCommon::ScrollUpdateInfo::operator==(
165 const LayerTreeHostCommon::ScrollUpdateInfo& other) const { 165 const LayerTreeHostCommon::ScrollUpdateInfo& other) const {
166 return layer_id == other.layer_id && scroll_delta == other.scroll_delta; 166 return layer_id == other.layer_id && scroll_delta == other.scroll_delta;
167 } 167 }
168 168
169 LayerTreeHostCommon::ScrollbarsUpdateInfo::ScrollbarsUpdateInfo() 169 LayerTreeHostCommon::ScrollbarsUpdateInfo::ScrollbarsUpdateInfo()
170 : layer_id(Layer::INVALID_ID), hidden(true) {} 170 : element_id(), hidden(true) {}
171 171
172 LayerTreeHostCommon::ScrollbarsUpdateInfo::ScrollbarsUpdateInfo(int layer_id, 172 LayerTreeHostCommon::ScrollbarsUpdateInfo::ScrollbarsUpdateInfo(ElementId id,
173 bool hidden) 173 bool hidden)
174 : layer_id(layer_id), hidden(hidden) {} 174 : element_id(id), hidden(hidden) {}
175 175
176 bool LayerTreeHostCommon::ScrollbarsUpdateInfo::operator==( 176 bool LayerTreeHostCommon::ScrollbarsUpdateInfo::operator==(
177 const LayerTreeHostCommon::ScrollbarsUpdateInfo& other) const { 177 const LayerTreeHostCommon::ScrollbarsUpdateInfo& other) const {
178 return layer_id == other.layer_id && hidden == other.hidden; 178 return element_id == other.element_id && hidden == other.hidden;
179 } 179 }
180 180
181 ScrollAndScaleSet::ScrollAndScaleSet() 181 ScrollAndScaleSet::ScrollAndScaleSet()
182 : page_scale_delta(1.f), 182 : page_scale_delta(1.f),
183 top_controls_delta(0.f), 183 top_controls_delta(0.f),
184 has_scrolled_by_wheel(false), 184 has_scrolled_by_wheel(false),
185 has_scrolled_by_touch(false) {} 185 has_scrolled_by_touch(false) {}
186 186
187 ScrollAndScaleSet::~ScrollAndScaleSet() {} 187 ScrollAndScaleSet::~ScrollAndScaleSet() {}
188 188
(...skipping 456 matching lines...) Expand 10 before | Expand all | Expand 10 after
645 645
646 PropertyTrees* GetPropertyTrees(Layer* layer) { 646 PropertyTrees* GetPropertyTrees(Layer* layer) {
647 return layer->layer_tree_host()->property_trees(); 647 return layer->layer_tree_host()->property_trees();
648 } 648 }
649 649
650 PropertyTrees* GetPropertyTrees(LayerImpl* layer) { 650 PropertyTrees* GetPropertyTrees(LayerImpl* layer) {
651 return layer->layer_tree_impl()->property_trees(); 651 return layer->layer_tree_impl()->property_trees();
652 } 652 }
653 653
654 } // namespace cc 654 } // namespace cc
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698