Changeset 234832 in webkit


Ignore:
Timestamp:
Aug 13, 2018 5:58:40 PM (6 years ago)
Author:
jonlee@apple.com
Message:

[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:
Location:
trunk/PerformanceTests
Files:
2 added
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/PerformanceTests/ChangeLog

    r234823 r234832  
     12018-08-13  Jon Lee  <jonlee@apple.com>
     2
     3        [MotionMark] Update Multiply test
     4        https://bugs.webkit.org/show_bug.cgi?id=188532
     5        <rdar://problem/43252151>
     6
     7        Reviewed by Said Abou-Hallawa.
     8
     9        Update Multiply test to have a larger upper limit of number of particles. Cycle through three
     10        different ways of hiding an element. Add new Multiple suite that isolates those components for
     11        debugging purposes.
     12
     13        * MotionMark/resources/debug-runner/tests.js:
     14        * MotionMark/tests/dom/multiply.html: Added.
     15        * MotionMark/tests/dom/resources/multiply.js: Added.
     16        * MotionMark/tests/master/resources/multiply.js:
     17
    1182018-08-13  Jon Lee  <jonlee@apple.com>
    219
  • trunk/PerformanceTests/MotionMark/resources/debug-runner/tests.js

    r234823 r234832  
    281281));
    282282
     283Suites.push(new Suite("Multiply suite",
     284    [
     285        {
     286            url: "dom/multiply.html?style=opacity",
     287            name: "Multiply: CSS opacity only"
     288        },
     289        {
     290            url: "dom/multiply.html?style=display",
     291            name: "Multiply: CSS display only"
     292        },
     293        {
     294            url: "dom/multiply.html?style=visibility",
     295            name: "Multiply: CSS visibility only"
     296        }
     297    ]
     298));
     299
    283300Suites.push(new Suite("Text suite",
    284301    [
  • trunk/PerformanceTests/MotionMark/tests/master/resources/multiply.js

    r224388 r234832  
    3333    }, {
    3434
     35    visibleCSS: [
     36        ["visibility", "hidden", "visible"],
     37        ["opacity", 0, 1],
     38        ["display", "none", "block"]
     39    ],
     40    totalRows: 45,
     41
    3542    initialize: function(benchmark, options)
    3643    {
    3744        Stage.prototype.initialize.call(this, benchmark, options);
    38         var tileSize = Math.round(this.size.height / 25);
     45        var tileSize = Math.round(this.size.height / this.totalRows);
     46        if (options.visibleCSS)
     47            this.visibleCSS = options.visibleCSS;
    3948
    4049        // Fill the scene with elements
     
    8493        tile.style.width = tileSize + 'px';
    8594        tile.style.height = tileSize + 'px';
    86         tile.style.visibility = "hidden";
     95        var visibleCSS = this.visibleCSS[this.tiles.length % this.visibleCSS.length];
     96        tile.style[visibleCSS[0]] = visibleCSS[1];
    8797
    8898        var distance = 1 / tileSize * this.size.multiply(0.5).subtract(new Point(x + halfTileSize, y + halfTileSize)).length();
     
    92102            step: Math.max(3, distance / 1.5),
    93103            distance: distance,
    94             active: false
     104            active: false,
     105            visibleCSS: visibleCSS,
    95106        });
    96107    },
     
    117128            var tile = this.tiles[i];
    118129            tile.active = true;
    119             tile.element.style.visibility = "";
     130            tile.element.style[tile.visibleCSS[0]] = tile.visibleCSS[2];
    120131            tile.rotate += tile.step;
    121132            tile.element.style.transform = "rotate(" + tile.rotate + "deg)";
     
    126137
    127138        for (var i = this._offsetIndex; i < this.tiles.length && this.tiles[i].active; ++i) {
    128             this.tiles[i].active = false;
    129             this.tiles[i].element.style.visibility = "hidden";
     139            var tile = this.tiles[i];
     140            tile.active = false;
     141            tile.element.style[tile.visibleCSS[0]] = tile.visibleCSS[1];
    130142        }
    131143    }
Note: See TracChangeset for help on using the changeset viewer.