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: Canvas2D</title> | 5 <title>GPU Feature Testing: Canvas2D</title> |
6 <script> | 6 <script> |
7 var frameCount = 0; | 7 var frameCount = 0; |
8 var context = null; | 8 var context = null; |
9 | 9 |
10 function init() { | 10 function init() { |
(...skipping 17 matching lines...) Expand all Loading... |
28 frameCount++; | 28 frameCount++; |
29 context.fillRect(0, 0, 100, frameCount); | 29 context.fillRect(0, 0, 100, frameCount); |
30 if (frameCount == 6) { | 30 if (frameCount == 6) { |
31 endTest(); | 31 endTest(); |
32 } else { | 32 } else { |
33 window.requestAnimationFrame(draw); | 33 window.requestAnimationFrame(draw); |
34 } | 34 } |
35 } | 35 } |
36 | 36 |
37 function endTest() { | 37 function endTest() { |
38 domAutomationController.setAutomationId(1); | |
39 domAutomationController.send("FINISHED"); | 38 domAutomationController.send("FINISHED"); |
40 } | 39 } |
41 </script> | 40 </script> |
42 </head> | 41 </head> |
43 <body onload="runTest()"> | 42 <body onload="runTest()"> |
44 Canvas2D should trigger GPU process launch if accelerated-2d-canvas is allowed. | 43 Canvas2D should trigger GPU process launch if accelerated-2d-canvas is allowed. |
45 300x300 is enough to trigger accelerated canvas 2D. | 44 300x300 is enough to trigger accelerated canvas 2D. |
46 <canvas id="da-canvas" width="300" height="300"></canvas> | 45 <canvas id="da-canvas" width="300" height="300"></canvas> |
47 </body> | 46 </body> |
48 </html> | 47 </html> |
OLD | NEW |