OLD | NEW |
| (Empty) |
1 <!DOCTYPE HTML> | |
2 <html> | |
3 <head> | |
4 <meta charset="utf-8"> | |
5 <title>GPU Feature Testing: Accelerated Compositing</title> | |
6 <style> | |
7 body { | |
8 -webkit-transform: translateZ(0); | |
9 } | |
10 </style> | |
11 <script> | |
12 var frameCount = 0; | |
13 // 3 is not enough for threaded compositing, using 6 to avoid racing. | |
14 var totalRafs = 6; | |
15 | |
16 function runTest() { | |
17 window.webkitRequestAnimationFrame(draw); | |
18 } | |
19 function draw() { | |
20 frameCount++; | |
21 var table = document.getElementById("table"); | |
22 table.style.backgroundColor = (frameCount & 1) ? 'red' : 'black'; | |
23 if (frameCount == totalRafs) { | |
24 domAutomationController.setAutomationId(1); | |
25 domAutomationController.send("FINISHED"); | |
26 } else { | |
27 window.webkitRequestAnimationFrame(draw); | |
28 } | |
29 } | |
30 </script> | |
31 </head> | |
32 <body onload="runTest()"> | |
33 This page should trigger accelerated-compositing, i.e., gpu process should | |
34 launch, if accelerated-compositing is allowed. | |
35 <table id="table" width="10" height="10"><tr/></table> | |
36 </body> | |
37 </html> | |
OLD | NEW |