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 5f0473b..5bd3c24 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 1c470c7..03a6ce7 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 d7306d5..8b26bfb 100644 (file)
@@ -1,5 +1,19 @@
 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
         https://bugs.webkit.org/show_bug.cgi?id=159006