| OLD | NEW |
| (Empty) | |
| 1 <!DOCTYPE html> |
| 2 <html> |
| 3 <body> |
| 4 <p> |
| 5 Test for crbug.com/609820. When running this test on Mac with retina display, |
| 6 the result should be a clear canvas with no artifact after a few seconds. |
| 7 </p> |
| 8 <canvas id='output' width='300' height='250'></canvas> |
| 9 <script> |
| 10 var repeat = 350; |
| 11 var x = y = 0; |
| 12 var canvas = document.getElementById("output"); |
| 13 var ctx = canvas.getContext('2d'); |
| 14 ctx.fillStyle = "#FF0000"; |
| 15 |
| 16 requestAnimationFrame(animate); |
| 17 |
| 18 function animate() |
| 19 { |
| 20 ctx.clearRect(x, y, 50, 50); |
| 21 x++; |
| 22 y++; |
| 23 ctx.fillRect(x, y, 50, 50); |
| 24 repeat--; |
| 25 if (repeat > 0) |
| 26 requestAnimationFrame(animate); |
| 27 } |
| 28 </script> |
| 29 </body> |
| 30 </html> |
| 31 |
| OLD | NEW |