Title: [202315] trunk/PerformanceTests
Revision
202315
Author
[email protected]
Date
2016-06-21 20:12:26 -0700 (Tue, 21 Jun 2016)

Log Message

Improvements to Animometer benchmark
https://bugs.webkit.org/show_bug.cgi?id=157738

Reviewed by Dean Jackson.
Provisionally reviewed by Said Abou-Hallawa.

Update tests.

* Animometer/tests/master/text.html: Ensure only three text sizes for
the three canvases.
* Animometer/tests/master/focus.html: Reduce the text size to fit with smaller
particle sizes.
* Animometer/tests/master/resources/focus.js: Remove the quadratic distribution for
particle sizes, and make it linear. Reduce the size variance. Shuffle the math to
reduce some calculations per frame. Fix the placement of the particles which might
otherwise be culled.
* Animometer/tests/master/resources/image-data.js: Reduce the particle size
to encourage larger scores.

Modified Paths

Diff

Modified: trunk/PerformanceTests/Animometer/tests/master/focus.html (202314 => 202315)


--- trunk/PerformanceTests/Animometer/tests/master/focus.html	2016-06-22 03:11:15 UTC (rev 202314)
+++ trunk/PerformanceTests/Animometer/tests/master/focus.html	2016-06-22 03:12:26 UTC (rev 202315)
@@ -21,6 +21,7 @@
     }
 
     #center-text {
+        font-size: 90%;
         transform: translate3d(-50%, -50%, 0);
     }
 

Modified: trunk/PerformanceTests/Animometer/tests/master/resources/focus.js (202314 => 202315)


--- trunk/PerformanceTests/Animometer/tests/master/resources/focus.js	2016-06-22 03:11:15 UTC (rev 202314)
+++ trunk/PerformanceTests/Animometer/tests/master/resources/focus.js	2016-06-22 03:12:26 UTC (rev 202315)
@@ -1,28 +1,26 @@
 (function() {
 
 var maxVerticalOffset = 50;
-var radius = 10;
-var centerDiameter = 100;
-var sizeVariance = 80;
-var travelDistance = 70;
+var minimumDiameter = 30;
+var centerDiameter = 90;
+var sizeVariance = 60;
+var travelDistance = 50;
 
-var minObjectDepth = 0.2;
-var maxObjectDepth = 1.0;
-
 var opacityMultiplier = 30;
 
 var FocusElement = Utilities.createClass(
     function(stage)
     {
-        var topOffset = maxVerticalOffset * Stage.randomSign();
-        var top = Stage.random(0, stage.size.height - 2 * radius - sizeVariance);
-        var left = Stage.random(0, stage.size.width - 2 * radius - sizeVariance);
+        var size = minimumDiameter + sizeVariance;
 
         // size and blurring are a function of depth
-        this._depth = Utilities.lerp(1 - Math.pow(Pseudo.random(), 2), minObjectDepth, maxObjectDepth);
-        var distance = Utilities.lerp(this._depth, 1, sizeVariance);
-        var size = 2 * radius + sizeVariance - distance;
+        this._depth = Pseudo.random();
+        var distance = Utilities.lerp(this._depth, 0, sizeVariance);
+        size -= distance;
 
+        var top = Stage.random(0, stage.size.height - size) - stage.maxBlurValue * 3;
+        var left = Stage.random(0, stage.size.width - size) - stage.maxBlurValue * 3;
+
         this.container = document.createElement('div');
         this.container.style.width = (size + stage.maxBlurValue * 6) + "px";
         this.container.style.height = (size + stage.maxBlurValue * 6) + "px";
@@ -30,16 +28,15 @@
         this.container.style.left = left + "px";
         this.container.style.zIndex = Math.round((1 - this._depth) * 10);
 
-        var particle = Utilities.createElement("div", {}, this.container);
-        particle.style.width = size + "px";
-        particle.style.height = size + "px";
-        particle.style.top = (stage.maxBlurValue * 3) + "px";
-        particle.style.left = (stage.maxBlurValue * 3) + "px";
-        this.particle = particle;
+        this.particle = Utilities.createElement("div", {}, this.container);
+        this.particle.style.width = size + "px";
+        this.particle.style.height = size + "px";
+        this.particle.style.top = (stage.maxBlurValue * 3) + "px";
+        this.particle.style.left = (stage.maxBlurValue * 3) + "px";
 
         var depthMultiplier = Utilities.lerp(1 - this._depth, 0.8, 1);
-        this._sinMultiplier = Pseudo.random() * Stage.randomSign() * depthMultiplier;
-        this._cosMultiplier = Pseudo.random() * Stage.randomSign() * depthMultiplier;
+        this._sinMultiplier = Pseudo.random() * Stage.randomSign() * depthMultiplier * travelDistance;
+        this._cosMultiplier = Pseudo.random() * Stage.randomSign() * depthMultiplier * travelDistance;
     }, {
 
     hide: function()
@@ -131,8 +128,8 @@
     animate: function()
     {
         var time = this._benchmark.timestamp;
-        var sinFactor = Math.sin(time / this.movementDuration) * travelDistance;
-        var cosFactor = Math.cos(time / this.movementDuration) * travelDistance;
+        var sinFactor = Math.sin(time / this.movementDuration);
+        var cosFactor = Math.cos(time / this.movementDuration);
 
         var focusProgress = 0.5 + 0.5 * Math.sin(time / this.focusDuration);
         this._focalPoint = focusProgress;

Modified: trunk/PerformanceTests/Animometer/tests/master/resources/image-data.js (202314 => 202315)


--- trunk/PerformanceTests/Animometer/tests/master/resources/image-data.js	2016-06-22 03:11:15 UTC (rev 202314)
+++ trunk/PerformanceTests/Animometer/tests/master/resources/image-data.js	2016-06-22 03:12:26 UTC (rev 202315)
@@ -8,10 +8,10 @@
         this._offsetIndex = 0;
     }, {
 
-    imageWidth: 100,
-    imageHeight: 100,
+    imageWidth: 50,
+    imageHeight: 50,
     pixelStride: 4,
-    rowStride: 400,
+    rowStride: 200,
     weightNegativeThreshold: 0.04,
     weightPositiveThreshold: 0.96,
     imageSrcs: [

Modified: trunk/PerformanceTests/Animometer/tests/master/text.html (202314 => 202315)


--- trunk/PerformanceTests/Animometer/tests/master/text.html	2016-06-22 03:11:15 UTC (rev 202314)
+++ trunk/PerformanceTests/Animometer/tests/master/text.html	2016-06-22 03:12:26 UTC (rev 202315)
@@ -7,29 +7,16 @@
 
         #stage {
             font-family: Helvetica;
-            font-size: 48px;
-            background-color: #313534;/* #d1948c;*/
+            font-size: 52px;
+            background-color: #313534;
         }
-        @media (min-device-height: 768px) and (max-device-height: 1024px) {
+        @media (max-width: 900px) {
             #stage {
                 font-size: 40px;
             }
         }
-        @media screen and (max-device-width: 414px),
-            screen and (max-device-height: 414px) and (orientation: landscape) {
+        @media (max-width: 568px) {
             #stage {
-                font-size: 36px;
-            }
-        }
-        @media screen and (max-device-width: 375px),
-            screen and (max-device-height: 375px) and (orientation: landscape) {
-            #stage {
-                font-size: 30px;
-            }
-        }
-        @media screen and (max-device-width: 320px),
-            screen and (max-device-height: 320px) and (orientation: landscape) {
-            #stage {
                 font-size: 28px;
             }
         }

Modified: trunk/PerformanceTests/ChangeLog (202314 => 202315)


--- trunk/PerformanceTests/ChangeLog	2016-06-22 03:11:15 UTC (rev 202314)
+++ trunk/PerformanceTests/ChangeLog	2016-06-22 03:12:26 UTC (rev 202315)
@@ -6,6 +6,27 @@
         Reviewed by Dean Jackson.
         Provisionally reviewed by Said Abou-Hallawa.
 
+        Update tests.
+
+        * Animometer/tests/master/text.html: Ensure only three text sizes for
+        the three canvases.
+        * Animometer/tests/master/focus.html: Reduce the text size to fit with smaller
+        particle sizes.
+        * Animometer/tests/master/resources/focus.js: Remove the quadratic distribution for
+        particle sizes, and make it linear. Reduce the size variance. Shuffle the math to
+        reduce some calculations per frame. Fix the placement of the particles which might
+        otherwise be culled.
+        * Animometer/tests/master/resources/image-data.js: Reduce the particle size
+        to encourage larger scores.
+
+2016-06-21  Jon Lee  <[email protected]>
+
+        Improvements to Animometer benchmark
+        https://bugs.webkit.org/show_bug.cgi?id=157738
+
+        Reviewed by Dean Jackson.
+        Provisionally reviewed by Said Abou-Hallawa.
+
         Include confidence interval for the final score, and store the canvas
         size in the serialization so that it is accurately shown in results.
 
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to