Bug 449371 Firefox/Thunderbird crashes at exit [@ gdk_display_x11_finalize], p=Brian...
[wine-gecko.git] / testing / performance / talos / page_load_test / jss / real-morph-4.html
blobd7f4ee0ef1bcba87adedc17964454af4f598f620
1 <html><head>
2 <!-- MOZ_INSERT_CONTENT_HOOK -->
3 <script src = runner.js></script>
4 <script>
5 var onlyName = 'Mesh Transform', onlyNum = 128;
6 function thisTest() {
8 // Test from here:
9 // http://webkit.org/misc/morph.html
11 startTest("real-morph");
13 var loops = 60, nx, nz;
15 function morph(a,f) {
16 var PI2nx = Math.PI * 8/nx;
17 var sin = Math.sin;
18 var f30 = -(50 * sin(f*Math.PI*2));
20 for (var i = 0; i < nz; ++i) {
21 for (var j = 0; j < nx; ++j) {
22 a[3*(i*nx+j)+1] = sin((j-1) * PI2nx ) * -f30
28 var a = Array();
29 for (var i=0; i < nx*nz*3; ++i)
30 a[i] = 0;
32 for ( var size = 16; size <= 128; size *= 2 ) (function(size){
33 nz = nx = size;
34 test("Mesh Transform", size, function(){
35 for (var i = 0; i < loops; ++i) {
36 morph(a, i/loops)
38 });
39 })(size);
41 endTest();
43 </script>
44 <body onload="thisTest()"></body></html>