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

Side by Side Diff: ManualTests/animation/compositor-animation-steps.html

Issue 812013002: Define step timing function for the cc animation framework. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Codereview fixes Created 5 years, 12 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
« no previous file with comments | « no previous file | Source/core/animation/CompositorAnimations.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 <html>
2 <style>
3 div {
4 position: relative;
5 height: 100px;
6 width: 100px;
7 background: blue;
8 }
9 </style>
10 <body>
11 <p>
12 Each section below has two boxes, the top runs on the main thread, the bottom
13 on the compositor.
14 </p><p>
15 This test is successful if the boxes are mostly in sync and all finish at the
16 same time.
17 </p>
18 <hr>
19
20 Steps for easing timing function is set to 9
21 <br>
22 <div id="test1a">MT</div>
23 <div id="test1b">CT</div>
24 <hr>
25
26 Per-keyframe steps easing function
27 <br>
28 <div id="test2a">MT</div>
29 <div id="test2b">CT</div>
30
31 Steps easing function combined with a cubic-bezier keyframe
32 (FIXME: the combining of timing functions is not fully supported in CT)
33 <br>
34 <div id="test3a">MT</div>
35 <div id="test3b">CT</div>
36
37 <script>
38 var transformKeyframes = [
39 {transform: 'translateX(0px)'},
40 {transform: 'translateX(500px)'}
41 ];
42 var leftKeyframes = [
43 {left: '0'},
44 {left: '500px'}
45 ];
46 var player1a = test1a.animate(leftKeyframes, {
47 duration: 6000,
48 iterations: Infinity,
49 easing: 'steps(9)'
50 });
51 var player1b = test1b.animate(transformKeyframes, {
52 duration: 6000,
53 iterations: Infinity,
54 easing: 'steps(9)'
55 });
56
57 var transformKeyframesEasing = [
58 {transform: 'translateX(0px)', easing: 'steps(18)'},
59 {transform: 'translateX(250px)', easing: 'steps(9)'},
60 {transform: 'translateX(500px)'}
61 ];
62 var leftKeyframesEasing = [
63 {left: '0', easing: 'steps(18)'},
64 {left: '250px', easing: 'steps(9)'},
65 {left: '500px'}
66 ];
67 var player2a = test2a.animate(leftKeyframesEasing, {
68 duration: 6000,
69 iterations: Infinity
70 });
71 var player2b = test2b.animate(transformKeyframesEasing, {
72 duration: 6000,
73 iterations: Infinity
74 });
75
76 var transformKeyframesCombinedEasing = [
77 {transform: 'translateX(0px)', easing: 'cubic-bezier(.5, -1, .5, 2)'},
78 {transform: 'translateX(500px)'}
79 ];
80 var leftKeyframesCombinedEasing = [
81 {left: '0', easing: 'cubic-bezier(.5, -1, .5, 2)'},
82 {left: '500px'}
83 ];
84 var player3a = test3a.animate(leftKeyframesCombinedEasing, {
85 duration: 6000,
86 iterations: Infinity,
87 easing: 'steps(9)'
88 });
89 var player3b = test3b.animate(transformKeyframesCombinedEasing, {
90 duration: 6000,
91 iterations: Infinity,
92 easing: 'steps(9)'
93 });
94 </script>
95 </body>
96 </html>
OLDNEW
« no previous file with comments | « no previous file | Source/core/animation/CompositorAnimations.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698