Chromium Code Reviews| OLD | NEW |
|---|---|
| (Empty) | |
| 1 <!DOCTYPE html> | |
| 2 <script src="../../fast/repaint/resources/text-based-repaint.js"></script> | |
| 3 <script> | |
| 4 window.testIsAsync = true; | |
| 5 | |
| 6 function interval() { | |
| 7 if (ani.currentTime >= 10 && ani.currentTime <= 20) { | |
| 8 ani.pause(); | |
| 9 finishRepaintTest(); | |
| 10 } | |
| 11 } | |
| 12 | |
| 13 function repaintTest() { | |
| 14 var circle = document.getElementsByTagName("circle")[0]; | |
| 15 ani = circle.animate([{ color: "blue" }, { color: "cyan"}], { duration: 2000 , iterations: 1}); | |
| 16 setInterval(interval, 1); | |
|
fs
2015/12/15 15:34:57
Use requestAnimationFrame instead - or maybe runAf
| |
| 17 } | |
| 18 </script> | |
| 19 <style> | |
| 20 circle { | |
| 21 fill: currentColor; | |
| 22 color: blue; | |
| 23 } | |
| 24 </style> | |
| 25 <body onload="runRepaintAndPixelTest()"> | |
|
fs
2015/12/15 15:34:57
I would prefer a ref-test if we really need to loo
| |
| 26 <svg xmlns="http://www.w3.org/2000/svg" width=90 height=90> | |
| 27 <circle r="40" cx="40" cy="40" /> | |
| 28 </svg> | |
| 29 </body> | |
| OLD | NEW |