OLD | NEW |
1 <!DOCTYPE HTML> | 1 <!DOCTYPE HTML> |
2 <html> | 2 <html> |
3 <head> | 3 <head> |
4 <meta charset="utf-8"> | 4 <meta charset="utf-8"> |
5 <title>GPU Feature Testing: Accelerated Compositing</title> | 5 <title>GPU Feature Testing: Accelerated Compositing</title> |
6 <style> | 6 <style> |
7 body { | 7 body { |
8 -webkit-transform: translateZ(0); | 8 -webkit-transform: translateZ(0); |
9 } | 9 } |
10 </style> | 10 </style> |
11 <script> | 11 <script> |
| 12 var frameCount = 0; |
| 13 |
12 function runTest() { | 14 function runTest() { |
13 domAutomationController.setAutomationId(1); | 15 window.webkitRequestAnimationFrame(draw); |
14 domAutomationController.send("FINISHED"); | 16 } |
| 17 function draw() { |
| 18 frameCount++; |
| 19 document.body.style.backgroundColor = (frameCount & 1) ? "red" : "blue"; |
| 20 if (frameCount == 5) { |
| 21 domAutomationController.setAutomationId(1); |
| 22 domAutomationController.send("FINISHED"); |
| 23 } else { |
| 24 window.webkitRequestAnimationFrame(draw); |
| 25 } |
15 } | 26 } |
16 </script> | 27 </script> |
17 </head> | 28 </head> |
18 <body onload="runTest()"> | 29 <body onload="runTest()"> |
19 This page should trigger accelerated-compositing, i.e., gpu process should launc
h, if accelerated-compositing is allowed. | 30 This page should trigger accelerated-compositing, i.e., gpu process should launc
h, if accelerated-compositing is allowed. |
20 </body> | 31 </body> |
21 </html> | 32 </html> |
OLD | NEW |