| 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 50 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 71 } | 71 } |
| 72 | 72 |
| 73 window.onload = function () { | 73 window.onload = function () { |
| 74 setSize(1, 1); | 74 setSize(1, 1); |
| 75 addPlayCallback(videoElement); | 75 addPlayCallback(videoElement); |
| 76 } | 76 } |
| 77 | 77 |
| 78 </script> | 78 </script> |
| 79 </body> | 79 </body> |
| 80 </html> | 80 </html> |
| OLD | NEW |