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

Unified Diff: cc/animation/animation_player.cc

Issue 1973083002: Use element id's for animations (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase Created 4 years, 6 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
« no previous file with comments | « cc/animation/animation_host_perftest.cc ('k') | cc/animation/animation_player_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/animation/animation_player.cc
diff --git a/cc/animation/animation_player.cc b/cc/animation/animation_player.cc
index f77bdd796bf775c9ce9c0702d1f7219f488a95e8..4cbd2a027aa23f0c8d1af605ef48d56d72a963d7 100644
--- a/cc/animation/animation_player.cc
+++ b/cc/animation/animation_player.cc
@@ -22,8 +22,7 @@ AnimationPlayer::AnimationPlayer(int id)
animation_timeline_(),
element_animations_(),
animation_delegate_(),
- id_(id),
- element_id_(0) {
+ id_(id) {
DCHECK(id_);
}
@@ -58,7 +57,7 @@ void AnimationPlayer::SetAnimationTimeline(AnimationTimeline* timeline) {
}
void AnimationPlayer::AttachElement(ElementId element_id) {
- DCHECK_EQ(element_id_, 0);
+ DCHECK(!element_id_);
DCHECK(element_id);
element_id_ = element_id;
@@ -74,7 +73,7 @@ void AnimationPlayer::DetachElement() {
if (animation_host_)
UnregisterPlayer();
- element_id_ = 0;
+ element_id_ = ElementId();
}
void AnimationPlayer::RegisterPlayer() {
« no previous file with comments | « cc/animation/animation_host_perftest.cc ('k') | cc/animation/animation_player_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698