OLD | NEW |
1 <!DOCTYPE html> | 1 <!DOCTYPE html> |
2 <html> | 2 <html> |
3 <body> | 3 <body> |
4 <script src="../resources/runner.js"></script> | 4 <script src="../resources/runner.js"></script> |
5 <script src="resources/canvas_runner.js"></script> | 5 <script src="resources/canvas_runner.js"></script> |
6 <script> | 6 <script> |
7 | 7 |
8 var canvas2D = document.createElement("canvas"); | 8 var canvas2D = document.createElement("canvas"); |
9 var ctx2D = canvas2D.getContext("2d"); | 9 var ctx2D = canvas2D.getContext("2d"); |
10 var canvas3D = document.createElement('canvas'); | 10 var canvas3D = document.createElement('canvas'); |
11 var gl = canvas3D.getContext('experimental-webgl'); | 11 var gl = canvas3D.getContext('webgl'); |
12 if(!gl) | 12 if(!gl) |
13 CanvasRunner.logFatalError("\nWebGL is not supported or enabled on this plat
form!\n"); | 13 CanvasRunner.logFatalError("\nWebGL is not supported or enabled on this plat
form!\n"); |
14 var tex = null; | 14 var tex = null; |
15 | 15 |
16 function setSize(width, height) { | 16 function setSize(width, height) { |
17 canvas2D.width = width; | 17 canvas2D.width = width; |
18 canvas2D.height = height; | 18 canvas2D.height = height; |
19 canvas3D.width = width; | 19 canvas3D.width = width; |
20 canvas3D.height = height; | 20 canvas3D.height = height; |
21 } | 21 } |
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
53 description: "This bench test checks the speed on uploading 2d Canvas(10
24x1024) to Webgl Texture(1024x1024).", | 53 description: "This bench test checks the speed on uploading 2d Canvas(10
24x1024) to Webgl Texture(1024x1024).", |
54 preRun: preRun, | 54 preRun: preRun, |
55 doRun: doRun, | 55 doRun: doRun, |
56 ensureComplete: ensureComplete, | 56 ensureComplete: ensureComplete, |
57 postRun: postRun}); | 57 postRun: postRun}); |
58 } | 58 } |
59 | 59 |
60 </script> | 60 </script> |
61 </body> | 61 </body> |
62 </html> | 62 </html> |
OLD | NEW |