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

Unified Diff: PerformanceTests/Animation/api-set-current-time-balls-keyframe-animations.html

Issue 433423003: Animations: Make perf tests for web animations animate properly. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 6 years, 4 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 | « PerformanceTests/Animation/api-balls-keyframe-animations.html ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: PerformanceTests/Animation/api-set-current-time-balls-keyframe-animations.html
diff --git a/PerformanceTests/Animation/api-set-current-time-balls-keyframe-animations.html b/PerformanceTests/Animation/api-set-current-time-balls-keyframe-animations.html
index 51de1df0c8c42b1f4bd6682728f012902d1851d6..d98c6e3c5aa1bdbc22c683fc59d50736879d59ab 100644
--- a/PerformanceTests/Animation/api-set-current-time-balls-keyframe-animations.html
+++ b/PerformanceTests/Animation/api-set-current-time-balls-keyframe-animations.html
@@ -132,8 +132,6 @@ function generateParticleKeyframes(index) {
}
allParticleKeyframes[index].push(generateKeyframe(t, x, y));
}
-
- return keyframes;
}
function generateKeyframe(t, x, y) {
@@ -150,7 +148,7 @@ function Particle(index)
domNode.style.backgroundColor = colors[Math.floor(Math.random() * colors.length)];
function start() {
- var player = domNode.animate(allParticleKeyframes[index], {easing: "linear", iterations: Infinity, direction: "alternate", duration: animationDuration});
+ var player = domNode.animate(allParticleKeyframes[index], {easing: "linear", iterations: Infinity, direction: "alternate", duration: animationDuration * 1000});
player.pause();
this.player = player;
}
@@ -171,7 +169,7 @@ function advance(timestamp)
if (start == null)
start = timestamp;
for (var x in particles) {
- particles[x].player.currentTime = (timestamp - start) / 1000;
+ particles[x].player.currentTime = timestamp - start;
}
if (particles.length !== 0)
requestAnimationFrame(advance);
« no previous file with comments | « PerformanceTests/Animation/api-balls-keyframe-animations.html ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698