Make sure multiply test particles have at least some opacity
authorjonlee@apple.com <jonlee@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 7 Mar 2016 02:40:16 +0000 (02:40 +0000)
committerjonlee@apple.com <jonlee@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 7 Mar 2016 02:40:16 +0000 (02:40 +0000)
https://bugs.webkit.org/show_bug.cgi?id=155027

Reviewed by Simon Fraser.

* Animometer/tests/master/resources/multiply.js:
(initialize): Have the elements spin a little faster to make it
more obvious when the system is being stressed.
(_addTile):
(animate): Make sure each element being animated has at least 1%
opacity.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@197651 268f45cc-cd09-0410-ab3c-d52691b4dbfc

PerformanceTests/Animometer/tests/master/resources/multiply.js
PerformanceTests/ChangeLog

index 28f246a..32d47a1 100644 (file)
@@ -23,7 +23,7 @@ var MultiplyStage = Utilities.createSubclass(Stage,
         var maxSide = Math.floor(y / tileStride) * 2 + 1;
         this._centerSpiralCount = maxSide * maxSide;
         for (var i = 0; i < this._centerSpiralCount; ++i) {
-            this._addTile(x, y, tileSize, i % 360);
+            this._addTile(x, y, tileSize, Stage.randomInt(0, 359));
 
             if (i == nextIndex) {
                 direction = (direction + 1) % 4;
@@ -47,7 +47,7 @@ var MultiplyStage = Utilities.createSubclass(Stage,
 
             if (Math.floor(i / maxSide) % 2 == 1)
                 sideX = this.size.width - sideX - tileSize + 1;
-            this._addTile(sideX, sideY, tileSize, (6 * i) % 360);
+            this._addTile(sideX, sideY, tileSize, Stage.randomInt(0, 359));
         }
     },
 
@@ -62,11 +62,10 @@ var MultiplyStage = Utilities.createSubclass(Stage,
         tile.style.visibility = "hidden";
 
         var distance = 1 / tileSize * this.size.multiply(0.5).subtract(new Point(x + halfTileSize, y + halfTileSize)).length();
-
         this.tiles.push({
             element: tile,
             rotate: rotateDeg,
-            step: Math.max(1, distance / 4),
+            step: Math.max(3, distance / 1.5),
             distance: distance,
             active: false
         });
@@ -97,7 +96,7 @@ var MultiplyStage = Utilities.createSubclass(Stage,
             tile.rotate += tile.step;
             tile.element.style.transform = "rotate(" + tile.rotate + "deg)";
 
-            var influence = 1 - (tile.distance * this._distanceFactor);
+            var influence = Math.max(.01, 1 - (tile.distance * this._distanceFactor));
             tile.element.style.backgroundColor = hslPrefix + l * Math.tan(influence / 1.25) + "%," + influence + ")";
         }
 
index e9ccdb1..2c831f0 100644 (file)
@@ -1,5 +1,19 @@
 2016-03-03  Jon Lee  <jonlee@apple.com>
 
+        Make sure multiply test particles have at least some opacity
+        https://bugs.webkit.org/show_bug.cgi?id=155027
+
+        Reviewed by Simon Fraser.
+
+        * Animometer/tests/master/resources/multiply.js:
+        (initialize): Have the elements spin a little faster to make it
+        more obvious when the system is being stressed.
+        (_addTile):
+        (animate): Make sure each element being animated has at least 1%
+        opacity.
+
+2016-03-03  Jon Lee  <jonlee@apple.com>
+
         Update image test
         https://bugs.webkit.org/show_bug.cgi?id=154962