5 <title>GPU Feature Testing: Canvas2D</title>
11 var canvas = document.getElementById("da-canvas");
15 context = canvas.getContext("2d");
22 window.webkitRequestAnimationFrame(draw);
29 context.fillRect(0, 0, 100, frameCount);
30 if (frameCount == 6) {
33 window.webkitRequestAnimationFrame(draw);
38 domAutomationController.setAutomationId(1);
39 domAutomationController.send("FINISHED");
43 <body onload="runTest()">
44 Canvas2D should trigger GPU process launch if accelerated-2d-canvas is allowed.
45 300x300 is enough to trigger accelerated canvas 2D.
46 <canvas id="da-canvas" width="300" height="300"></canvas>