Changeset 199134 in webkit
- Timestamp:
- Apr 6, 2016 6:47:53 PM (8 years ago)
- Location:
- trunk/PerformanceTests
- Files:
-
- 2 added
- 4 edited
- 2 moved
Legend:
- Unmodified
- Added
- Removed
-
trunk/PerformanceTests/Animometer/resources/debug-runner/tests.js
r198509 r199134 171 171 }, 172 172 { 173 url: "dom/particles.html", 174 name: "DOM particles, SVG masks" 175 }, 176 { 173 177 url: "dom/compositing-transforms.html?particleWidth=50&particleHeight=50&filters=yes&imageSrc=../resources/yin-yang.svg", 174 178 name: "Composited Transforms" -
trunk/PerformanceTests/Animometer/resources/runner/tests.js
r198509 r199134 46 46 }, 47 47 { 48 url: "master/ particles.html",49 name: " DOM particles, SVG masks"48 url: "master/svg-particles.html", 49 name: "Suits" 50 50 }, 51 51 ] -
trunk/PerformanceTests/Animometer/tests/dom/particles.html
r199130 r199134 19 19 <script src="../resources/math.js"></script> 20 20 <script src="../resources/main.js"></script> 21 <script src=" resources/particles.js"></script>21 <script src="../master/resources/particles.js"></script> 22 22 <script src="resources/dom-particles.js"></script> 23 23 </body> -
trunk/PerformanceTests/Animometer/tests/dom/resources/dom-particles.js
r199130 r199134 14 14 Particle.prototype.reset.call(this); 15 15 16 var emitLocation = Stage.randomElementInArray(this.stage.emitLocation); 17 this.position = new Point(emitLocation.x, emitLocation.y); 16 this.position = Stage.randomElementInArray(this.stage.emitLocation); 18 17 19 18 var angle = Stage.randomInt(0, this.stage.emitSteps) / this.stage.emitSteps * Math.PI * 2 + Stage.dateCounterValue(100) * this.stage.emissionSpin; -
trunk/PerformanceTests/Animometer/tests/master/resources/particles.js
r197910 r199134 16 16 var randSize = Math.round(Math.pow(Pseudo.random(), 4) * this.sizeRange + this.sizeMinimum); 17 17 this.size = new Point(randSize, randSize); 18 this.maxPosition = this.stage.size.subtract(this.size); 18 this.minPosition = this.size.multiply(.5); 19 this.maxPosition = this.stage.size.subtract(this.minPosition); 19 20 }, 20 21 … … 31 32 this.velocity.x *= -1; 32 33 this.position.x = this.maxPosition.x; 33 } else if (this.position.x < 0) {34 } else if (this.position.x < this.minPosition.x) { 34 35 // If particle is going to move off left side 35 36 if (this.velocity.x < 0) 36 37 this.velocity.x *= -1; 37 this.position.x = 0;38 this.position.x = this.minPosition.x; 38 39 } 39 40 … … 51 52 this.position.y = this.maxPosition.y; 52 53 } 53 } else if (this.position.y < 0) {54 } else if (this.position.y < this.minPosition.y) { 54 55 // If particle is going to move off top side 55 56 var magnitude = this.velocity.length(); … … 58 59 if (this.velocity.y < 0) 59 60 this.velocity.y *= -0.998; 60 this.position.y = 0;61 this.position.y = this.minPosition.y; 61 62 } 62 63 -
trunk/PerformanceTests/ChangeLog
r198728 r199134 1 2016-04-06 Jon Lee <jonlee@apple.com> 2 3 Update master benchmark with SVG test 4 https://bugs.webkit.org/show_bug.cgi?id=156273 5 6 Reviewed by Dean Jackson. 7 Provisionally reviewed by Said Abou-Hallawa. 8 9 Switch masks tests for SVG path test. 10 11 * Animometer/resources/debug-runner/tests.js: Move mask test here. 12 * Animometer/resources/runner/tests.js: Add SVG test here. 13 * Animometer/tests/dom/particles.html: Renamed from PerformanceTests/Animometer/tests/master/particles.html. 14 * Animometer/tests/dom/resources/dom-particles.js: Renamed from PerformanceTests/Animometer/tests/master/resources/dom-particles.js. 15 16 * Animometer/tests/master/resources/particles.js: Add minPosition for bounds checking. Prevents particle from being 17 partially obscured. 18 * Animometer/tests/master/resources/svg-particles.js: Added. 19 (Particle): The particle is either a path object or a rect using a path as a clip. The 20 same path is used either way. For each particle create a linear gradient with a random 21 rotation. 22 (SVGParticlesStage): Look in #shapes to see how many different kinds of paths are available. 23 This makes the test more generic in case other shapes need to be tested. 24 * Animometer/tests/master/svg-particles.html: Added. Have two defs, one that houses each 25 particle's gradient, and one that holds the shape templates. 26 1 27 2016-03-27 Hunseop Jeong <hs85.jeong@samsung.com> 2 28
Note: See TracChangeset
for help on using the changeset viewer.