OLD | NEW |
1 <!DOCTYPE html> | 1 <!DOCTYPE html> |
2 <html> | 2 <html> |
3 <body> | 3 <body> |
4 <video id="video" loop></video> | 4 <video id="video" loop></video> |
5 <script src="../resources/runner.js"></script> | 5 <script src="../resources/runner.js"></script> |
6 <script src="resources/canvas_runner.js"></script> | 6 <script src="resources/canvas_runner.js"></script> |
7 <script> | 7 <script> |
8 var videoElement = document.getElementById("video"); | 8 var videoElement = document.getElementById("video"); |
9 var canvas3D = document.createElement('canvas'); | 9 var canvas3D = document.createElement('canvas'); |
10 var gl = canvas3D.getContext('experimental-webgl'); | 10 var gl = canvas3D.getContext('webgl'); |
11 if(!gl) | 11 if(!gl) |
12 CanvasRunner.logFatalError("\nWebGL is not supported or enabled on this plat
form!\n"); | 12 CanvasRunner.logFatalError("\nWebGL is not supported or enabled on this plat
form!\n"); |
13 | 13 |
14 function setSize(width, height) { | 14 function setSize(width, height) { |
15 canvas3D.width = width; | 15 canvas3D.width = width; |
16 canvas3D.height = height; | 16 canvas3D.height = height; |
17 } | 17 } |
18 | 18 |
19 function addPlayCallback(videoElement) { | 19 function addPlayCallback(videoElement) { |
20 // This logic makes sure this perf test starts after playing the video. | 20 // This logic makes sure this perf test starts after playing the video. |
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
73 } | 73 } |
74 | 74 |
75 window.onload = function () { | 75 window.onload = function () { |
76 setSize(1, 1); | 76 setSize(1, 1); |
77 addPlayCallback(videoElement); | 77 addPlayCallback(videoElement); |
78 } | 78 } |
79 | 79 |
80 </script> | 80 </script> |
81 </body> | 81 </body> |
82 </html> | 82 </html> |
OLD | NEW |