Diff
Modified: trunk/PerformanceTests/ChangeLog (234831 => 234832)
--- trunk/PerformanceTests/ChangeLog 2018-08-14 00:39:03 UTC (rev 234831)
+++ trunk/PerformanceTests/ChangeLog 2018-08-14 00:58:40 UTC (rev 234832)
@@ -1,5 +1,22 @@
2018-08-13 Jon Lee <[email protected]>
+ [MotionMark] Update Multiply test
+ https://bugs.webkit.org/show_bug.cgi?id=188532
+ <rdar://problem/43252151>
+
+ Reviewed by Said Abou-Hallawa.
+
+ Update Multiply test to have a larger upper limit of number of particles. Cycle through three
+ different ways of hiding an element. Add new Multiple suite that isolates those components for
+ debugging purposes.
+
+ * MotionMark/resources/debug-runner/tests.js:
+ * MotionMark/tests/dom/multiply.html: Added.
+ * MotionMark/tests/dom/resources/multiply.js: Added.
+ * MotionMark/tests/master/resources/multiply.js:
+
+2018-08-13 Jon Lee <[email protected]>
+
[MotionMark] Update Leaves test
https://bugs.webkit.org/show_bug.cgi?id=188530
<rdar://problem/43251862>
Modified: trunk/PerformanceTests/MotionMark/resources/debug-runner/tests.js (234831 => 234832)
--- trunk/PerformanceTests/MotionMark/resources/debug-runner/tests.js 2018-08-14 00:39:03 UTC (rev 234831)
+++ trunk/PerformanceTests/MotionMark/resources/debug-runner/tests.js 2018-08-14 00:58:40 UTC (rev 234832)
@@ -280,6 +280,23 @@
]
));
+Suites.push(new Suite("Multiply suite",
+ [
+ {
+ url: "dom/multiply.html?style=opacity",
+ name: "Multiply: CSS opacity only"
+ },
+ {
+ url: "dom/multiply.html?style=display",
+ name: "Multiply: CSS display only"
+ },
+ {
+ url: "dom/multiply.html?style=visibility",
+ name: "Multiply: CSS visibility only"
+ }
+ ]
+));
+
Suites.push(new Suite("Text suite",
[
{
Added: trunk/PerformanceTests/MotionMark/tests/dom/multiply.html (0 => 234832)
--- trunk/PerformanceTests/MotionMark/tests/dom/multiply.html (rev 0)
+++ trunk/PerformanceTests/MotionMark/tests/dom/multiply.html 2018-08-14 00:58:40 UTC (rev 234832)
@@ -0,0 +1,78 @@
+<!--
+ Copyright (C) 2018 Apple Inc. All rights reserved.
+
+ Redistribution and use in source and binary forms, with or without
+ modification, are permitted provided that the following conditions
+ are met:
+ 1. Redistributions of source code must retain the above copyright
+ notice, this list of conditions and the following disclaimer.
+ 2. Redistributions in binary form must reproduce the above copyright
+ notice, this list of conditions and the following disclaimer in the
+ documentation and/or other materials provided with the distribution.
+
+ THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
+ AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
+ THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
+ BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
+ THE POSSIBILITY OF SUCH DAMAGE.
+-->
+<!DOCTYPE html>
+<html>
+<head>
+ <meta charset="utf-8">
+ <link rel="stylesheet" type="text/css" href=""
+ <style type="text/css">
+
+ #stage {
+ background-color: #222;
+ }
+
+ #stage div {
+ position: absolute;
+ }
+
+ #stage .div-0 {
+ border-top-right-radius: 100%;
+ }
+
+ #stage .div-1 {
+ border-top-left-radius: 100%;
+ }
+
+ #stage .div-2 {
+ border-bottom-left-radius: 100%;
+ }
+
+ #stage .div-3 {
+ border-bottom-right-radius: 100%;
+ }
+
+ #stage .div-4 {
+ border-bottom-left-radius: 100%;
+ border-top-right-radius: 100%;
+ }
+
+ #stage .div-5 {
+ border-bottom-right-radius: 100%;
+ border-top-left-radius: 100%;
+ }
+ </style>
+</head>
+<body>
+ <div id="stage">
+ </div>
+ <script src=""
+ <script src=""
+ <script src=""
+ <script src=""
+ <script src=""
+ <script src=""
+ <script src=""
+</body>
+</html>
Added: trunk/PerformanceTests/MotionMark/tests/dom/resources/multiply.js (0 => 234832)
--- trunk/PerformanceTests/MotionMark/tests/dom/resources/multiply.js (rev 0)
+++ trunk/PerformanceTests/MotionMark/tests/dom/resources/multiply.js 2018-08-14 00:58:40 UTC (rev 234832)
@@ -0,0 +1,48 @@
+/*
+ * Copyright (C) 2018 Apple Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
+ * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
+ * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
+ * THE POSSIBILITY OF SUCH DAMAGE.
+ */
+(function() {
+
+var MultiplyBenchmark = window.benchmarkClass;
+var MultiplyDerivedBenchmark = Utilities.createSubclass(MultiplyBenchmark,
+ function(options)
+ {
+ switch (options["style"]) {
+ case "opacity":
+ options.visibleCSS = [["opacity", 0, 1]];
+ break;
+ case "display":
+ options.visibleCSS = [["display", "none", "block"]];
+ break;
+ case "visibility":
+ options.visibleCSS = [["visibility", "hidden", "visible"]];
+ break;
+ }
+ MultiplyBenchmark.call(this, options);
+ }
+);
+
+window.benchmarkClass = MultiplyDerivedBenchmark;
+
+})();
\ No newline at end of file
Modified: trunk/PerformanceTests/MotionMark/tests/master/resources/multiply.js (234831 => 234832)
--- trunk/PerformanceTests/MotionMark/tests/master/resources/multiply.js 2018-08-14 00:39:03 UTC (rev 234831)
+++ trunk/PerformanceTests/MotionMark/tests/master/resources/multiply.js 2018-08-14 00:58:40 UTC (rev 234832)
@@ -32,10 +32,19 @@
this._offsetIndex = 0;
}, {
+ visibleCSS: [
+ ["visibility", "hidden", "visible"],
+ ["opacity", 0, 1],
+ ["display", "none", "block"]
+ ],
+ totalRows: 45,
+
initialize: function(benchmark, options)
{
Stage.prototype.initialize.call(this, benchmark, options);
- var tileSize = Math.round(this.size.height / 25);
+ var tileSize = Math.round(this.size.height / this.totalRows);
+ if (options.visibleCSS)
+ this.visibleCSS = options.visibleCSS;
// Fill the scene with elements
var x = Math.round((this.size.width - tileSize) / 2);
@@ -83,7 +92,8 @@
tile.style.top = y + 'px';
tile.style.width = tileSize + 'px';
tile.style.height = tileSize + 'px';
- tile.style.visibility = "hidden";
+ var visibleCSS = this.visibleCSS[this.tiles.length % this.visibleCSS.length];
+ tile.style[visibleCSS[0]] = visibleCSS[1];
var distance = 1 / tileSize * this.size.multiply(0.5).subtract(new Point(x + halfTileSize, y + halfTileSize)).length();
this.tiles.push({
@@ -91,7 +101,8 @@
rotate: rotateDeg,
step: Math.max(3, distance / 1.5),
distance: distance,
- active: false
+ active: false,
+ visibleCSS: visibleCSS,
});
},
@@ -116,7 +127,7 @@
for (var i = 0; i < this._offsetIndex; ++i) {
var tile = this.tiles[i];
tile.active = true;
- tile.element.style.visibility = "";
+ tile.element.style[tile.visibleCSS[0]] = tile.visibleCSS[2];
tile.rotate += tile.step;
tile.element.style.transform = "rotate(" + tile.rotate + "deg)";
@@ -125,8 +136,9 @@
}
for (var i = this._offsetIndex; i < this.tiles.length && this.tiles[i].active; ++i) {
- this.tiles[i].active = false;
- this.tiles[i].element.style.visibility = "hidden";
+ var tile = this.tiles[i];
+ tile.active = false;
+ tile.element.style[tile.visibleCSS[0]] = tile.visibleCSS[1];
}
}
});