| Index: PerformanceTests/Blending/resources/framerate.js
|
| diff --git a/PerformanceTests/Animation/resources/framerate.js b/PerformanceTests/Blending/resources/framerate.js
|
| similarity index 77%
|
| copy from PerformanceTests/Animation/resources/framerate.js
|
| copy to PerformanceTests/Blending/resources/framerate.js
|
| index 2b3d0c03c59ee2e0ea931f9e07ecfd5e1f1f1397..6871eba7df0ff9d1123ef0e928cd03c3c370d843 100644
|
| --- a/PerformanceTests/Animation/resources/framerate.js
|
| +++ b/PerformanceTests/Blending/resources/framerate.js
|
| @@ -4,6 +4,7 @@ var framesPerTimerReading = 10;
|
| var frameCount = 0;
|
| var startTime;
|
| var trackingFrameRate = false;
|
| +var currentTest;
|
|
|
| function trackFrameRate(currTime)
|
| {
|
| @@ -13,20 +14,25 @@ function trackFrameRate(currTime)
|
| startTime = currTime;
|
| }
|
|
|
| + if (currentTest && currentTest.run)
|
| + currentTest.run();
|
| +
|
| if (trackingFrameRate)
|
| requestAnimationFrame(trackFrameRate);
|
| }
|
|
|
| -window.startTrackingFrameRate = function() {
|
| +window.startTrackingFrameRate = function(test) {
|
| if (trackingFrameRate)
|
| return;
|
| trackingFrameRate = true;
|
| + currentTest = test;
|
| startTime = performance.now();
|
| trackFrameRate();
|
| };
|
|
|
| window.stopTrackingFrameRate = function() {
|
| trackingFrameRate = false;
|
| + currentTest = undefined;
|
| };
|
|
|
| })();
|
|
|