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

Side by Side Diff: sky/engine/core/animation/AnimationPlayerTest.cpp

Issue 772673002: Fix Animations, Remove Compostior Animations. (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: CompositorPendingAnimations -> PendingAnimations Created 6 years 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 /* 1 /*
2 * Copyright (c) 2013, Google Inc. All rights reserved. 2 * Copyright (c) 2013, Google Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions are 5 * modification, are permitted provided that the following conditions are
6 * met: 6 * met:
7 * 7 *
8 * * Redistributions of source code must retain the above copyright 8 * * Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * * Redistributions in binary form must reproduce the above 10 * * Redistributions in binary form must reproduce the above
(...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after
71 { 71 {
72 Timing timing; 72 Timing timing;
73 timing.iterationDuration = duration; 73 timing.iterationDuration = duration;
74 timing.playbackRate = playbackRate; 74 timing.playbackRate = playbackRate;
75 return Animation::create(0, nullptr, timing); 75 return Animation::create(0, nullptr, timing);
76 } 76 }
77 77
78 bool simulateFrame(double time) 78 bool simulateFrame(double time)
79 { 79 {
80 document->animationClock().updateTime(time); 80 document->animationClock().updateTime(time);
81 document->compositorPendingAnimations().update(false); 81 document->pendingAnimations().update(false);
82 // The timeline does not know about our player, so we have to explicitly call update(). 82 // The timeline does not know about our player, so we have to explicitly call update().
83 return player->update(TimingUpdateForAnimationFrame); 83 return player->update(TimingUpdateForAnimationFrame);
84 } 84 }
85 85
86 RefPtr<Document> document; 86 RefPtr<Document> document;
87 RefPtr<AnimationTimeline> timeline; 87 RefPtr<AnimationTimeline> timeline;
88 RefPtr<AnimationPlayer> player; 88 RefPtr<AnimationPlayer> player;
89 TrackExceptionState exceptionState; 89 TrackExceptionState exceptionState;
90 }; 90 };
91 91
(...skipping 695 matching lines...) Expand 10 before | Expand all | Expand 10 after
787 } 787 }
788 788
789 TEST_F(AnimationAnimationPlayerTest, HasLowerPriority) 789 TEST_F(AnimationAnimationPlayerTest, HasLowerPriority)
790 { 790 {
791 RefPtr<AnimationPlayer> player1 = timeline->createAnimationPlayer(0); 791 RefPtr<AnimationPlayer> player1 = timeline->createAnimationPlayer(0);
792 RefPtr<AnimationPlayer> player2 = timeline->createAnimationPlayer(0); 792 RefPtr<AnimationPlayer> player2 = timeline->createAnimationPlayer(0);
793 EXPECT_TRUE(AnimationPlayer::hasLowerPriority(player1.get(), player2.get())) ; 793 EXPECT_TRUE(AnimationPlayer::hasLowerPriority(player1.get(), player2.get())) ;
794 } 794 }
795 795
796 } 796 }
OLDNEW
« no previous file with comments | « sky/engine/core/animation/AnimationPlayer.cpp ('k') | sky/engine/core/animation/AnimationStack.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698