Title: [192550] trunk/PerformanceTests
- Revision
- 192550
- Author
- s...@apple.com
- Date
- 2015-11-17 16:16:56 -0800 (Tue, 17 Nov 2015)
Log 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):
Modified Paths
Diff
Modified: trunk/PerformanceTests/Animometer/runner/resources/animometer.css (192549 => 192550)
--- trunk/PerformanceTests/Animometer/runner/resources/animometer.css 2015-11-18 00:08:38 UTC (rev 192549)
+++ trunk/PerformanceTests/Animometer/runner/resources/animometer.css 2015-11-18 00:16:56 UTC (rev 192550)
@@ -328,9 +328,10 @@
}
section#running > #running-test > iframe {
- width: 100%;
- height: 100%;
+ width: 800px;
+ height: 600px;
border: 0px none;
+ overflow: hidden;
}
section#running > #progress {
@@ -361,6 +362,13 @@
padding: 16px;
}
+@media screen and (min-device-width: 1800px) {
+ section#running > #running-test > iframe {
+ width: 1600px;
+ height: 800px;
+ }
+}
+
/* -------------------------------------------------------------------------- */
/* Results Section */
/* -------------------------------------------------------------------------- */
Modified: trunk/PerformanceTests/Animometer/tests/bouncing-particles/resources/bouncing-particles.js (192549 => 192550)
--- trunk/PerformanceTests/Animometer/tests/bouncing-particles/resources/bouncing-particles.js 2015-11-18 00:08:38 UTC (rev 192549)
+++ trunk/PerformanceTests/Animometer/tests/bouncing-particles/resources/bouncing-particles.js 2015-11-18 00:16:56 UTC (rev 192550)
@@ -23,36 +23,44 @@
// If particle is going to move off right side
if (this._position.x + this._size.x > this._stageSize.x) {
- // If direction is East-South
+ // If direction is East-South, go West-South.
if (this._angle >= 0 && this._angle < Math.PI / 2)
this._angle = Math.PI - this._angle;
- // If angle is East-North
+ // If angle is East-North, go West-North.
else if (this._angle > Math.PI / 2 * 3)
this._angle = this._angle - (this._angle - Math.PI / 2 * 3) * 2;
+ // Make sure the particle does not go outside the stage boundaries.
+ this._position.x = this._stageSize.x - this._size.x;
}
// If particle is going to move off left side
if (this._position.x < 0) {
- // If angle is West-South
+ // If angle is West-South, go East-South.
if (this._angle > Math.PI / 2 && this._angle < Math.PI)
this._angle = Math.PI - this._angle;
- // If angle is West-North
+ // If angle is West-North, go East-North.
else if (this._angle > Math.PI && this._angle < Math.PI / 2 * 3)
this._angle = this._angle + (Math.PI / 2 * 3 - this._angle) * 2;
+ // Make sure the particle does not go outside the stage boundaries.
+ this._position.x = 0;
}
// If particle is going to move off bottom side
if (this._position.y + this._size.y > this._stageSize.y) {
- // If direction is South
+ // If direction is South, go North.
if (this._angle > 0 && this._angle < Math.PI)
this._angle = Math.PI * 2 - this._angle;
+ // Make sure the particle does not go outside the stage boundaries.
+ this._position.y = this._stageSize.y - this._size.y;
}
// If particle is going to move off top side
if (this._position.y < 0) {
- // If direction is North
+ // If direction is North, go South.
if (this._angle > Math.PI && this._angle < Math.PI * 2)
this._angle = this._angle - (this._angle - Math.PI) * 2;
+ // Make sure the particle does not go outside the stage boundaries.
+ this._position.y = 0;
}
}
}
Modified: trunk/PerformanceTests/ChangeLog (192549 => 192550)
--- trunk/PerformanceTests/ChangeLog 2015-11-18 00:08:38 UTC (rev 192549)
+++ trunk/PerformanceTests/ChangeLog 2015-11-18 00:16:56 UTC (rev 192550)
@@ -1,5 +1,22 @@
2015-11-17 Said Abou-Hallawa <sabouhall...@apple.com>
+ 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):
+
+2015-11-17 Said Abou-Hallawa <sabouhall...@apple.com>
+
Use the media queries to dynamically set the stage for the graphics benchmark
https://bugs.webkit.org/show_bug.cgi?id=151327
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes