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 No Damage</title> | 5 <title>GPU Feature Testing: Accelerated Compositing No Damage</title> |
6 <style> | 6 <style> |
7 body { | 7 body { |
8 transform: translateZ(0); | 8 transform: translateZ(0); |
9 } | 9 } |
10 </style> | 10 </style> |
11 <script> | 11 <script> |
12 var frameCount = 0; | 12 var frameCount = 0; |
13 var totalRafs = 50; | 13 var totalRafs = 50; |
14 | 14 |
15 function runTest() { | 15 function runTest() { |
16 window.requestAnimationFrame(draw); | 16 window.requestAnimationFrame(draw); |
17 } | 17 } |
18 function draw() { | 18 function draw() { |
19 console.time("___RafWithNoDamage___"); | 19 console.time("___RafWithNoDamage___"); |
20 frameCount++; | 20 frameCount++; |
21 if (frameCount == totalRafs) { | 21 if (frameCount == totalRafs) { |
22 domAutomationController.setAutomationId(1); | |
23 domAutomationController.send("FINISHED"); | 22 domAutomationController.send("FINISHED"); |
24 } else { | 23 } else { |
25 window.requestAnimationFrame(draw); | 24 window.requestAnimationFrame(draw); |
26 } | 25 } |
27 console.timeEnd("___RafWithNoDamage___"); | 26 console.timeEnd("___RafWithNoDamage___"); |
28 } | 27 } |
29 </script> | 28 </script> |
30 </head> | 29 </head> |
31 <body onload="runTest()"> | 30 <body onload="runTest()"> |
32 This page should trigger accelerated-compositing, i.e., gpu process should | 31 This page should trigger accelerated-compositing, i.e., gpu process should |
33 launch, if accelerated-compositing is allowed. However, the RAF callback | 32 launch, if accelerated-compositing is allowed. However, the RAF callback |
34 does no damage, so there will be no Swaps and the RAF rate should be throttled | 33 does no damage, so there will be no Swaps and the RAF rate should be throttled |
35 by software timers. | 34 by software timers. |
36 </body> | 35 </body> |
37 </html> | 36 </html> |
OLD | NEW |