Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(148)

Side by Side Diff: tools/perf/page_sets/tough_canvas_cases/rendering_throughput/fill_shapes.html

Issue 2047773002: Added telemetry pages for the canvas element. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Some formatting Created 4 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 <!DOCTYPE html> 1 <!DOCTYPE html>
2 <html> 2 <html>
3 <head></head> 3 <head></head>
4 4
5 <body> 5 <body>
6 <canvas id="canvas" width="800" height="600"> 6 <canvas id="canvas" width="800" height="600">
7 <script type="text/javascript" src="bench.js"></script> 7 <script type="text/javascript" src="bench.js"></script>
8 <script type="text/javascript" src="canvas_arcs.js"></script> 8 <script type="text/javascript" src="canvas_tough_cases_lib.js"></script>
9 9 <script type="text/javascript" src="fill_shapes.js"></script>
10 10
11 <script type="text/javascript"> 11 <script type="text/javascript">
12 window.onload = init; 12 window.onload = init;
13 13
14 var canvas; 14 var canvas;
15 var context; 15 var context;
16 16
17 function init() { 17 function init() {
18 canvas = document.getElementById('canvas'); 18 canvas = document.getElementById('canvas');
19 context = canvas.getContext('2d'); 19 context = canvas.getContext('2d');
20 20
21 num_arcs = 1000; 21 num_shapes = 1000;
22 arc_speed = 2; 22 stage_fill_shapes.init(num_shapes, 800, 600);
23 arcs.init(num_arcs, arc_speed, 800, 600); 23 stage_fill_shapes.draw(context);
24 arcs.draw(context);
25 24
26 bench.run(draw); 25 bench.run(draw);
27 } 26 }
28 27
29 function draw() { 28 function draw() {
30 context.clearRect(0, 0, 800, 600); 29 context.clearRect(0, 0, 800, 600);
31 arcs.draw(context); 30 stage_fill_shapes.draw(context);
32 }; 31 };
33 32
34 </script> 33 </script>
35 34
36 </body> 35 </body>
37 36
38 </html> 37 </html>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698