WebKit Bugzilla
Attachment 347044 Details for
Bug 188532
: [MotionMark] Update Multiply test
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
Patch
bug-188532-20180813145715.patch (text/plain), 9.92 KB, created by
Jon Lee
on 2018-08-13 14:57:16 PDT
(
hide
)
Description:
Patch
Filename:
MIME Type:
Creator:
Jon Lee
Created:
2018-08-13 14:57:16 PDT
Size:
9.92 KB
patch
obsolete
>Subversion Revision: 234580 >diff --git a/PerformanceTests/ChangeLog b/PerformanceTests/ChangeLog >index 14b7a0d95ff03aef84c94720aaf9ca1bd0eeacd6..c6d0e1c43afc144f9660180b27ab5b2be0384313 100644 >--- a/PerformanceTests/ChangeLog >+++ b/PerformanceTests/ChangeLog >@@ -1,3 +1,20 @@ >+2018-08-13 Jon Lee <jonlee@apple.com> >+ >+ [MotionMark] Update Multiply test >+ https://bugs.webkit.org/show_bug.cgi?id=188532 >+ <rdar://problem/43252151> >+ >+ Reviewed by NOBODY (OOPS!). >+ >+ 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 <jonlee@apple.com> > > [MotionMark] Update Leaves test >diff --git a/PerformanceTests/MotionMark/resources/debug-runner/tests.js b/PerformanceTests/MotionMark/resources/debug-runner/tests.js >index 03b36268b68dc53f987fe965445f0ea2d9580eda..7d701c943750bc00bffdf53021f8039b249279ef 100644 >--- a/PerformanceTests/MotionMark/resources/debug-runner/tests.js >+++ b/PerformanceTests/MotionMark/resources/debug-runner/tests.js >@@ -280,6 +280,23 @@ Suites.push(new Suite("Leaves suite", > ] > )); > >+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", > [ > { >diff --git a/PerformanceTests/MotionMark/tests/dom/multiply.html b/PerformanceTests/MotionMark/tests/dom/multiply.html >new file mode 100644 >index 0000000000000000000000000000000000000000..2a7968921c97aa0aeea68a443fc4702877fb20b5 >--- /dev/null >+++ b/PerformanceTests/MotionMark/tests/dom/multiply.html >@@ -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="../resources/stage.css"> >+ <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="../../resources/strings.js"></script> >+ <script src="../../resources/extensions.js"></script> >+ <script src="../../resources/statistics.js"></script> >+ <script src="../resources/math.js"></script> >+ <script src="../resources/main.js"></script> >+ <script src="../master/resources/multiply.js"></script> >+ <script src="resources/multiply.js"></script> >+</body> >+</html> >diff --git a/PerformanceTests/MotionMark/tests/dom/resources/multiply.js b/PerformanceTests/MotionMark/tests/dom/resources/multiply.js >new file mode 100644 >index 0000000000000000000000000000000000000000..322a3b487acd43a24b16a9e40a0e8557aa665252 >--- /dev/null >+++ b/PerformanceTests/MotionMark/tests/dom/resources/multiply.js >@@ -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 >diff --git a/PerformanceTests/MotionMark/tests/master/resources/multiply.js b/PerformanceTests/MotionMark/tests/master/resources/multiply.js >index 54d6a45606885f3f53dedbc4fd4be4b502366f91..e58eaa3b2ab4e18adc3c3439d96ad2205d9b51e5 100644 >--- a/PerformanceTests/MotionMark/tests/master/resources/multiply.js >+++ b/PerformanceTests/MotionMark/tests/master/resources/multiply.js >@@ -32,10 +32,19 @@ var MultiplyStage = Utilities.createSubclass(Stage, > 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 @@ var MultiplyStage = Utilities.createSubclass(Stage, > 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 @@ var MultiplyStage = Utilities.createSubclass(Stage, > rotate: rotateDeg, > step: Math.max(3, distance / 1.5), > distance: distance, >- active: false >+ active: false, >+ visibleCSS: visibleCSS, > }); > }, > >@@ -116,7 +127,7 @@ var MultiplyStage = Utilities.createSubclass(Stage, > 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 @@ var MultiplyStage = Utilities.createSubclass(Stage, > } > > 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]; > } > } > });
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Formatted Diff
|
Diff
Attachments on
bug 188532
: 347044