Update canvas size when benchmark begins
authorjonlee@apple.com <jonlee@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 22 Jun 2016 03:26:57 +0000 (03:26 +0000)
committerjonlee@apple.com <jonlee@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 22 Jun 2016 03:26:57 +0000 (03:26 +0000)
https://bugs.webkit.org/show_bug.cgi?id=159010

Reviewed by Dean Jackson.

Previously we would evaluate the media queries and assign the canvas size to the test
on body.onload. Instead, do it once the user starts the benchmark.

* Animometer/resources/debug-runner/animometer.js: Move benchmarkController.determineCanvasSize()
to benchmarkController._startBenchmark.
* Animometer/resources/runner/animometer.js: Ditto.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@202318 268f45cc-cd09-0410-ab3c-d52691b4dbfc

PerformanceTests/Animometer/resources/debug-runner/animometer.js
PerformanceTests/Animometer/resources/runner/animometer.js
PerformanceTests/ChangeLog

index 5f0473bd68fc34a13bd9db794ac19f707a787cd2..5bd3c247668a99acdac3800a38fe748df6e6591b 100644 (file)
@@ -507,7 +507,6 @@ Utilities.extendObject(window.benchmarkController, {
         if (benchmarkController.startBenchmarkImmediatelyIfEncoded())
             return;
 
-        benchmarkController.determineCanvasSize();
         benchmarkController.addOrientationListenerIfNecessary();
         suitesManager.createElements();
         suitesManager.updateUIFromLocalStorage();
@@ -568,6 +567,7 @@ Utilities.extendObject(window.benchmarkController, {
 
     startBenchmark: function()
     {
+        benchmarkController.determineCanvasSize();
         benchmarkController.options = optionsManager.updateLocalStorageFromUI();
         benchmarkController.suites = suitesManager.updateLocalStorageFromUI();
         this._startBenchmark(benchmarkController.suites, benchmarkController.options, "running-test");
index 1c470c749cd654e5e28f7641461a594fcaca2660..03a6ce705c6c87b01f7e963691dd8090e23aa80e 100644 (file)
@@ -436,7 +436,6 @@ window.sectionsManager =
 window.benchmarkController = {
     initialize: function()
     {
-        benchmarkController.determineCanvasSize();
         benchmarkController.addOrientationListenerIfNecessary();
     },
 
@@ -488,6 +487,8 @@ window.benchmarkController = {
 
     _startBenchmark: function(suites, options, frameContainerID)
     {
+        benchmarkController.determineCanvasSize();
+
         var configuration = document.body.className.match(/small|medium|large/);
         if (configuration)
             options[Strings.json.configuration] = configuration[0];
index d7306d513ffd6f791ade1bcd5fc57d0972c145de..8b26bfb29309571d9a335a6ee198626c3a4396b9 100644 (file)
@@ -1,3 +1,17 @@
+2016-06-21  Jon Lee  <jonlee@apple.com>
+
+        Update canvas size when benchmark begins
+        https://bugs.webkit.org/show_bug.cgi?id=159010
+
+        Reviewed by Dean Jackson.
+
+        Previously we would evaluate the media queries and assign the canvas size to the test
+        on body.onload. Instead, do it once the user starts the benchmark.
+
+        * Animometer/resources/debug-runner/animometer.js: Move benchmarkController.determineCanvasSize()
+        to benchmarkController._startBenchmark.
+        * Animometer/resources/runner/animometer.js: Ditto.
+
 2016-06-21  Jon Lee  <jonlee@apple.com>
 
         Add new timestamp option