Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(149)

Side by Side Diff: PerformanceTests/Animation/resources/framerate.js

Issue 1163373006: Revert of Finalize migration of blink_perf.animation to smoothness.tough_animation_cases (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 5 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « PerformanceTests/Animation/mix-blend-mode-propagating-isolation.html ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 (function(){
2
3 var framesPerTimerReading = 10;
4 var frameCount = 0;
5 var startTime;
6 var trackingFrameRate = false;
7
8 function trackFrameRate(currTime)
9 {
10 if (++frameCount == framesPerTimerReading) {
11 frameCount = 0;
12 PerfTestRunner.measureValueAsync(1000 * framesPerTimerReading / (currTim e - startTime));
13 startTime = currTime;
14 }
15
16 if (trackingFrameRate)
17 requestAnimationFrame(trackFrameRate);
18 }
19
20 window.startTrackingFrameRate = function() {
21 if (trackingFrameRate)
22 return;
23 trackingFrameRate = true;
24 startTime = performance.now();
25 trackFrameRate();
26 };
27
28 window.stopTrackingFrameRate = function() {
29 trackingFrameRate = false;
30 };
31
32 })();
OLDNEW
« no previous file with comments | « PerformanceTests/Animation/mix-blend-mode-propagating-isolation.html ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698