From 55e25989e592ad90cd094050145916a5f6192393 Mon Sep 17 00:00:00 2001 From: "commit-queue@webkit.org" Date: Tue, 17 Nov 2015 03:29:43 +0000 Subject: [PATCH] Remove the option for animating using setInterval from the graphics benchmark https://bugs.webkit.org/show_bug.cgi?id=151283 Patch by Said Abou-Hallawa on 2015-11-16 Reviewed by Darin Adler. Get rid of the option to run animation using setInterval(). * Animometer/tests/resources/main.js: (Animator.prototype.animate): (Benchmark): (Benchmark.prototype.start): (Animator.prototype.start): Deleted. git-svn-id: https://svn.webkit.org/repository/webkit/trunk@192505 268f45cc-cd09-0410-ab3c-d52691b4dbfc --- PerformanceTests/Animometer/tests/resources/main.js | 20 +++----------------- PerformanceTests/ChangeLog | 15 +++++++++++++++ 2 files changed, 18 insertions(+), 17 deletions(-) diff --git a/PerformanceTests/Animometer/tests/resources/main.js b/PerformanceTests/Animometer/tests/resources/main.js index ed99855..86d42ca 100644 --- a/PerformanceTests/Animometer/tests/resources/main.js +++ b/PerformanceTests/Animometer/tests/resources/main.js @@ -74,11 +74,6 @@ function Animator(benchmark, options) Animator.prototype = { - start: function() - { - this._intervalId = setInterval(this.animate.bind(this), 1); - }, - timeDelta: function() { return this._currentTimeOffset - this._startTimeOffset; @@ -117,14 +112,10 @@ Animator.prototype = // Adjust the test to reach the desired FPS. var result = this._benchmark.update(this._currentTimeOffset, this.timeDelta(), currentFrameRate); - // Stop the animator if the benchmark has finished. - if (!result && typeof this._intervalId != "undefined") - clearInterval(this._intervalId); - // Start the next drop/measure cycle. this._frameCount = 0; - // result may stop the animator if requestAnimationFrame() has been used. + // If result == 0, no more requestAnimationFrame() will be invoked. return result; }, @@ -138,8 +129,6 @@ Animator.prototype = function Benchmark(options) { this._options = options; - this._method = this._options["method"] || "requestAnimationFrame"; - this._recordInterval = 200; this._isSampling = false; @@ -147,7 +136,7 @@ function Benchmark(options) var lowValue = -parseInt(this._options["addLimit"]) || 1; var highValue = parseInt(this._options["removeLimit"]) || 1; - this._controller = new PIDController(gain, options["frame-rate"], lowValue, highValue); + this._controller = new PIDController(gain, this._options["frame-rate"], lowValue, highValue); this._sampler = new Sampler(2); this._state = new BenchmarkState(this._options["test-interval"] * 1000); } @@ -157,10 +146,7 @@ Benchmark.prototype = // Called from the load event listener or from this.run(). start: function() { - if (this._method == "setInterval") - this._animator.start(); - else - this._animator.animateLoop(); + this._animator.animateLoop(); }, // Called from the animator to adjust the complexity of the test. diff --git a/PerformanceTests/ChangeLog b/PerformanceTests/ChangeLog index 5d44bf7..e0eb7f6 100644 --- a/PerformanceTests/ChangeLog +++ b/PerformanceTests/ChangeLog @@ -1,5 +1,20 @@ 2015-11-16 Said Abou-Hallawa + Remove the option for animating using setInterval from the graphics benchmark + https://bugs.webkit.org/show_bug.cgi?id=151283 + + Reviewed by Darin Adler. + + Get rid of the option to run animation using setInterval(). + + * Animometer/tests/resources/main.js: + (Animator.prototype.animate): + (Benchmark): + (Benchmark.prototype.start): + (Animator.prototype.start): Deleted. + +2015-11-16 Said Abou-Hallawa + Highlight the alarming test results in the graphics benchmark results page https://bugs.webkit.org/show_bug.cgi?id=151286 -- 1.8.3.1