Changeset 192550 in webkit


Ignore:
Timestamp:
Nov 17, 2015 4:16:56 PM (8 years ago)
Author:
Said Abou-Hallawa
Message:

Disable flattening the stage iframe of the graphics benchmark when running on iOS
https://bugs.webkit.org/show_bug.cgi?id=151361

Reviewed by Simon Fraser.

Use fixed size for stage iframe of the graphics benchmark to disable
flattening the iframe while animating the particles. Also ensure the
bouncing particles do not go outside the iframe's boundaries.

  • Animometer/runner/resources/animometer.css:

(section#running > #running-test > iframe):
(@media screen and (min-device-width: 1800px)):

  • Animometer/tests/bouncing-particles/resources/bouncing-particles.js:

(BouncingParticle.prototype.animate):

Location:
trunk/PerformanceTests
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/PerformanceTests/Animometer/runner/resources/animometer.css

    r192549 r192550  
    329329
    330330section#running > #running-test > iframe {
    331     width: 100%;
    332     height: 100%;
     331    width: 800px;
     332    height: 600px;
    333333    border: 0px none;
     334    overflow: hidden;
    334335}
    335336
     
    360361    right: 0px;
    361362    padding: 16px;
     363}
     364
     365@media screen and (min-device-width: 1800px) {
     366    section#running > #running-test > iframe {
     367        width: 1600px;
     368        height: 800px;
     369    }
    362370}
    363371
  • trunk/PerformanceTests/Animometer/tests/bouncing-particles/resources/bouncing-particles.js

    r192549 r192550  
    2424        // If particle is going to move off right side
    2525        if (this._position.x + this._size.x > this._stageSize.x) {
    26             // If direction is East-South
     26            // If direction is East-South, go West-South.
    2727            if (this._angle >= 0 && this._angle < Math.PI / 2)
    2828                this._angle = Math.PI - this._angle;
    29             // If angle is East-North
     29            // If angle is East-North, go West-North.
    3030            else if (this._angle > Math.PI / 2 * 3)
    3131                this._angle = this._angle - (this._angle - Math.PI / 2 * 3) * 2;
     32            // Make sure the particle does not go outside the stage boundaries.
     33            this._position.x = this._stageSize.x - this._size.x;
    3234        }
    3335       
    3436        // If particle is going to move off left side
    3537        if (this._position.x < 0) {
    36             // If angle is West-South
     38            // If angle is West-South, go East-South.
    3739            if (this._angle > Math.PI / 2 && this._angle < Math.PI)
    3840                this._angle = Math.PI - this._angle;
    39             // If angle is West-North
     41            // If angle is West-North, go East-North.
    4042            else if (this._angle > Math.PI && this._angle < Math.PI / 2 * 3)
    4143                this._angle = this._angle + (Math.PI / 2 * 3 - this._angle) * 2;
     44            // Make sure the particle does not go outside the stage boundaries.
     45            this._position.x = 0;
    4246        }
    4347
    4448        // If particle is going to move off bottom side
    4549        if (this._position.y + this._size.y > this._stageSize.y) {
    46             // If direction is South
     50            // If direction is South, go North.
    4751            if (this._angle > 0 && this._angle < Math.PI)
    4852                this._angle = Math.PI * 2 - this._angle;
     53            // Make sure the particle does not go outside the stage boundaries.
     54            this._position.y = this._stageSize.y - this._size.y;
    4955        }
    5056
    5157        // If particle is going to move off top side
    5258        if (this._position.y < 0) {
    53             // If direction is North
     59            // If direction is North, go South.
    5460            if (this._angle > Math.PI && this._angle < Math.PI * 2)
    5561                this._angle = this._angle - (this._angle - Math.PI) * 2;
     62            // Make sure the particle does not go outside the stage boundaries.
     63            this._position.y = 0;
    5664        }
    5765    }
  • trunk/PerformanceTests/ChangeLog

    r192549 r192550  
     12015-11-17  Said Abou-Hallawa  <sabouhallawa@apple.com>
     2
     3        Disable flattening the stage iframe of the graphics benchmark when running on iOS
     4        https://bugs.webkit.org/show_bug.cgi?id=151361
     5
     6        Reviewed by Simon Fraser.
     7       
     8        Use fixed size for stage iframe of the graphics benchmark to disable
     9        flattening the iframe while animating the particles. Also ensure the
     10        bouncing particles do not go outside the iframe's boundaries.
     11
     12        * Animometer/runner/resources/animometer.css:
     13        (section#running > #running-test > iframe):
     14        (@media screen and (min-device-width: 1800px)):
     15        * Animometer/tests/bouncing-particles/resources/bouncing-particles.js:
     16        (BouncingParticle.prototype.animate):
     17
    1182015-11-17  Said Abou-Hallawa  <sabouhallawa@apple.com>
    219
Note: See TracChangeset for help on using the changeset viewer.