Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 <!-- | 1 <!-- |
| 2 Copyright (c) 2012 Cameron Adams. All rights reserved. | 2 Copyright (c) 2012 Cameron Adams. All rights reserved. |
| 3 Copyright (c) 2012 Code Aurora Forum. All rights reserved. | 3 Copyright (c) 2012 Code Aurora Forum. All rights reserved. |
| 4 Copyright (C) 2013 Google Inc. All rights reserved. | 4 Copyright (C) 2013 Google Inc. All rights reserved. |
| 5 | 5 |
| 6 Redistribution and use in source and binary forms, with or without | 6 Redistribution and use in source and binary forms, with or without |
| 7 modification, are permitted provided that the following conditions are | 7 modification, are permitted provided that the following conditions are |
| 8 met: | 8 met: |
| 9 * Redistributions of source code must retain the above copyright | 9 * Redistributions of source code must retain the above copyright |
| 10 notice, this list of conditions and the following disclaimer. | 10 notice, this list of conditions and the following disclaimer. |
| (...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 63 var maxParticles = 2500; | 63 var maxParticles = 2500; |
| 64 var minVelocity = 50; | 64 var minVelocity = 50; |
| 65 var maxVelocity = 500; | 65 var maxVelocity = 500; |
| 66 var particleRadius = 6; | 66 var particleRadius = 6; |
| 67 var colors = ["#cc0000", "#ffcc00", "#aaff00", "#0099cc", "#194c99", "#661999"]; | 67 var colors = ["#cc0000", "#ffcc00", "#aaff00", "#0099cc", "#194c99", "#661999"]; |
| 68 | 68 |
| 69 var testRunning = true; | 69 var testRunning = true; |
| 70 var particles = []; | 70 var particles = []; |
| 71 | 71 |
| 72 window.onload = function () { | 72 window.onload = function () { |
| 73 PerfTestRunner.prepareToMeasureValuesAsync({done: onCompletedRun, unit: 'fps '}); | 73 PerfTestRunner.prepareToMeasureValuesAsync({ |
| 74 description: 'Measures performance of CSS transition animation (animatin g on left and top).', | |
|
rjwright
2014/10/15 03:37:13
"Measure performance of CSS Transitions animating
| |
| 75 done: onCompletedRun, | |
| 76 unit: 'fps' | |
| 77 }); | |
| 74 | 78 |
| 75 // Create the particles | 79 // Create the particles |
| 76 for (var i = 0; i < maxParticles; i++) { | 80 for (var i = 0; i < maxParticles; i++) { |
| 77 var particle = new Particle(); | 81 var particle = new Particle(); |
| 78 particle.start(); | 82 particle.start(); |
| 79 particles.push(particle); | 83 particles.push(particle); |
| 80 } | 84 } |
| 81 | 85 |
| 82 startTrackingFrameRate(); | 86 startTrackingFrameRate(); |
| 83 } | 87 } |
| (...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 156 function onCompletedRun() { | 160 function onCompletedRun() { |
| 157 stopTrackingFrameRate(); | 161 stopTrackingFrameRate(); |
| 158 | 162 |
| 159 for (var i = 0; i < particles.length; i++) | 163 for (var i = 0; i < particles.length; i++) |
| 160 particles[i].destroy(); | 164 particles[i].destroy(); |
| 161 particles = []; | 165 particles = []; |
| 162 } | 166 } |
| 163 </script> | 167 </script> |
| 164 </head> | 168 </head> |
| 165 </html> | 169 </html> |
| OLD | NEW |