Animator.prototype =
{
- start: function()
- {
- this._intervalId = setInterval(this.animate.bind(this), 1);
- },
-
timeDelta: function()
{
return this._currentTimeOffset - this._startTimeOffset;
// 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;
},
function Benchmark(options)
{
this._options = options;
- this._method = this._options["method"] || "requestAnimationFrame";
-
this._recordInterval = 200;
this._isSampling = false;
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);
}
// 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.
2015-11-16 Said Abou-Hallawa <sabouhallawa@apple.com>
+ 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 <sabouhallawa@apple.com>
+
Highlight the alarming test results in the graphics benchmark results page
https://bugs.webkit.org/show_bug.cgi?id=151286