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

Unified Diff: cc/animation/scroll_offset_animations.cc

Issue 2860293002: Change cc::ElementId to be a uint64_t (Closed)
Patch Set: none Created 3 years, 7 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 side-by-side diff with in-line comments
Download patch
Index: cc/animation/scroll_offset_animations.cc
diff --git a/cc/animation/scroll_offset_animations.cc b/cc/animation/scroll_offset_animations.cc
index 3998c89a8db44388fe152823863d3d82201168fc..e2a8da473f716946caef49a318e28fda1bfba0bb 100644
--- a/cc/animation/scroll_offset_animations.cc
+++ b/cc/animation/scroll_offset_animations.cc
@@ -20,8 +20,8 @@ ScrollOffsetAnimations::~ScrollOffsetAnimations() {}
ScrollOffsetAnimationUpdate ScrollOffsetAnimations::GetUpdateForElementId(
ElementId element_id) const {
- DCHECK(element_id);
- auto iter = element_to_update_map_.find(element_id);
+ DCHECK(element_id.id);
+ auto iter = element_to_update_map_.find(element_id.id);
return iter == element_to_update_map_.end()
? ScrollOffsetAnimationUpdate(element_id)
: iter->second;
@@ -29,19 +29,19 @@ ScrollOffsetAnimationUpdate ScrollOffsetAnimations::GetUpdateForElementId(
void ScrollOffsetAnimations::AddAdjustmentUpdate(ElementId element_id,
gfx::Vector2dF adjustment) {
- DCHECK(element_id);
+ DCHECK(element_id.id);
ScrollOffsetAnimationUpdate update = GetUpdateForElementId(element_id);
update.adjustment_ += adjustment;
- element_to_update_map_[element_id] = update;
+ element_to_update_map_[element_id.id] = update;
wkorman 2017/05/08 18:23:24 The need to explicitly ref id member data in hash
animation_host_->SetNeedsCommit();
animation_host_->SetNeedsPushProperties();
}
void ScrollOffsetAnimations::AddTakeoverUpdate(ElementId element_id) {
- DCHECK(element_id);
+ DCHECK(element_id.id);
ScrollOffsetAnimationUpdate update = GetUpdateForElementId(element_id);
update.takeover_ = true;
- element_to_update_map_[element_id] = update;
+ element_to_update_map_[element_id.id] = update;
animation_host_->SetNeedsCommit();
animation_host_->SetNeedsPushProperties();
}

Powered by Google App Engine
This is Rietveld 408576698